Jump to content
Light-O-Rama Forums

Video


derekb

Recommended Posts

Just guessing here, but thinking maybe the BAUD=xxxxx in the bat file may need to match the baud rate in the LOR suite.  However, after just looking at it, the actual baud rate I was unable to locate, in the older versions you actually saw what the baud rate actually was, not it doesn't give that number.   And I'm thinking that this may be the problem, but since I have no idea what the "regular"{default} baud rate is now, wouldn't know what to set the BAUD=xxxxx too now.

 

Just noticed that the actual baud rate is now MIA in the LOR Suite, I'd prefer to have kept that info viewable for such cases as this where BAUD=xxxxx may need to match the exact Baud rate in the LOR Suite.   

 

So don't quite get why the numbers were taken out for the baud rates.   Or if they are still there, I haven't been successful in relocating that info.

Crazy thing now is the .bat is running through LOR. Don't know if this matters or not, when you click on the file in the folder itself...it opens a split second faster than opening in LOR. Both files are opening and showing no errors though. Oh.... when clicking the .bat file direct from the folder it is stored in... it works with the projector correctly. But does not work through LOR.

Link to comment
Share on other sites

Ok,

I have tried this several different ways without MUCH success. Every so often (once maybe after rebooting...I honestly can't remember) it would work. However, the "Off" command would not work nor did I try re-booting to try and get the off command to work.

 

These files WILL work when clicked on them directly in it's destination folder. However when I point LOR to the file, it does not. The file is working or comes up in LOR as if it were clicked on directly. The .bin file runs in other words. However...the projector does not turn on nor off.  I have moved the file directly into the LOR folder without success as well. 

 

Here is the path I have am currently using;

"C:\Users\Burtonr\Documents\Light Show Stuff\Projector\On and Off remotely\On4.bat"

Quotes are used because of the the spaces in the path name.

 

I am including the files below. Credit should be given to ErnieHorning over at doityourselfchristmas.com for the initial files. Also I have named it On4 and Off4 because of the Comm port it is using. 

 

I do not have the LOR dongle hooked up when trying this out.

 

 

Help me Obi Wan Kanobi you're my only hope :-)

Projector.zip

Link to comment
Share on other sites

My "real" suggestion would be to get in touch with the author of the batch and bin files.  I'll offer a guess, however:

 

In Off4.bat, you have:

 

copy Off.bin com4: >nul

 

My guess would be to change that to:

 

copy "C:\Users\Burtonr\Documents\Light Show Stuff\Projector\On and Off remotely\Off.bin" com4: >nul

 

In case it's not clear, that's supposed to be all on one single line.

 

And a similar change in On4.bat.

Link to comment
Share on other sites

If Bob's suggestion does not work I have a couple of suggestions.

 

Change the system PATH variable to include C:\Users\Burtonr\Documents\Light Show Stuff\Projector\On and Off remotely

If you don't know how to do that let me know and let me know what OS version you are using.

 

Copy all the files to a directory in a simple path without any spaces, c:\temp\test, for example. I've never launched a command from LOR but maybe it is not handling the spaces in the path correctly?

 

In the .bat files add a line prior to the copy command:

cd "C:\Users\Burtonr\Documents\Light Show Stuff\Projector\On and Off remotely"

 

Good Luck!

Link to comment
Share on other sites

If Bob's suggestion does not work I have a couple of suggestions.

 

Change the system PATH variable to include C:\Users\Burtonr\Documents\Light Show Stuff\Projector\On and Off remotely

If you don't know how to do that let me know and let me know what OS version you are using.

 

Copy all the files to a directory in a simple path without any spaces, c:\temp\test, for example. I've never launched a command from LOR but maybe it is not handling the spaces in the path correctly?

 

In the .bat files add a line prior to the copy command:

cd "C:\Users\Burtonr\Documents\Light Show Stuff\Projector\On and Off remotely"

 

Good Luck!

Ok. This worked.

Bob. Not sure if it is a bug or what. I am running 3.8 LOR with the Advanced version.

I did the copy of what you mentioned Bob.

copy "C:\Users\Burtonr\Documents\Light Show Stuff\Projector\On and Off remotely\Off.bin" com4: >nul  (not sure what I would have to do that since it was in the same folder. Anyway...did)

Now please note this. I had taken my laptop (which I am doing this from) to work with me. I never shut it down. I always just close the lid, then put in the case and go. So when I start up it goes to the sign on screen. Sign on and the screen is where I left off. Anyway, I had taken it to work...so when I came home to check email...there it was...did the above change.... and your suggestion worked Bob....one time.  I changed out both "On" and "Off"...again both worked ONE TIME.  After then it wouldn't work. I would assume if I closed the lid, it would and signed back in...it would work.

 

When I tried TonyD's suggestion...I did this;

c:\temp\On4.bat (and Off4.bat).  I put in all the .bat files and .bin files in that c:\temp folder. Tried this several times...and it worked all the times I tried.  So....guess this problem is fixed :-)

 

Thanks to you both.

Link to comment
Share on other sites

Bob. Not sure if it is a bug or what. I am running 3.8 LOR with the Advanced version.

Okay I see what the issue is.  When LOR shells to DOS, the path is lost.  Most likely the default directory is wherever CMD.EXE is run from. So

simply changing the line

 

copy Off.bin com4: >nul to copy %~dp0Off.bin com4: >nul

 

would fix the problem.  Now these files could reside in any directory and the batch file would still find the bin file.

 

Note: The ‘%~dp0’ just simply adds the path that the batch file was started from.  This will work on Windows 2000 or newer.  It’s an internal fuction of CMD.EXE.

 

Link to comment
Share on other sites

Erinie thanks for the info!

 

Derekb, sorry for hogging the thread! :-) Will be looking forward to your setup. Sounds neat 8-)

Link to comment
Share on other sites

No problem. All information is good, I am taking all this knowledge and working on getting my projectors to turn on and off as well. Good thread. My .bat files are gonna be loaded with commands.

Link to comment
Share on other sites

Glad it's working.  Just wanted to expound a bit on one more thing:

 

I did the copy of what you mentioned Bob.

copy "C:\Users\Burtonr\Documents\Light Show Stuff\Projector\On and Off remotely\Off.bin" com4: >nul  (not sure what I would have to do that since it was in the same folder. Anyway...did)

 

That's because the fact that you changed the shell command to let Windows know where to find the batch file does not imply that the batch file knows where to find the bin file.  Even if the batch file and the bin file are in the same directory.  It's something like this:

 

Let's say the batch and bin files are in C:\MyStuff.  And you make the shell command:

 

MyBatch.bat

 

That fails, because Windows is not looking in C:\MyStuff; it's looking in C:\WhoKnowsWhereWindowsIsLooking, and there's no file called MyBatch.bat in C:\WhoKnowsWhereWindowsIsLooking.  So you change the shell command:

 

C:\MyStuff\MyBatch.bat

 

So now Windows knows that MyBatch.bat is to be found in C:\MyStuff.  But the default place where Windows will look for stuff is still C:\WhoKnowsWhereWindowsIsLooking.  You didn't tell Windows to change the default place to look for stuff; you told it where to look for MyBatch.bat specifically.

 

So that batch file contains:

 

copy MyBin.bin com4: >nul

 

It doesn't say where to look for MyBin.bin, and so Windows looks in the default place: C:\WhoKnowsWhereWindowsIsLooking.  And there's no file named MyBin.bin there, so it fails.

 

That's why I suggested being explicit about where to find the bin file.  And the suggestions made by TonyD and ErnieHorning essentially change the default place that Windows is looking (during that run of the batch file).

Link to comment
Share on other sites

  • The topic was locked
Guest
This topic is now closed to further replies.
×
×
  • Create New...