- March 2, 2008
- 10
- 0
My goal is to accomplish the following - I'd like to remap a button to work my lighting system.
On my first press of the button my movie lights turn on + main lights off
Second press - all lights off
third press - main lights on
I've accomplished this previously via a batch file, which works great until I use it through translator - it works fine when I manually run it via command prompt, or via double clicking it, but it does not run fine with the built in launcher for some reason. It runs the same command over and over again - batch file code below
The Ahcmd.exe is a dos command tool to send X10 commands through my USB X10 Controller CM19a
Setx is a microsoft tool for setting environmental variables that are persistant (rather than the regular set command, which only sets the variable for the current window) - for some reason the setx command is unable to set the environmental variable for the whole system when run from inside Translator. (operating system = XP pro)
I'm not stuck on making my batch file work. If you have an alternate solution to accomplish the same goal, I'm game to try something else.
On my first press of the button my movie lights turn on + main lights off
Second press - all lights off
third press - main lights on
I've accomplished this previously via a batch file, which works great until I use it through translator - it works fine when I manually run it via command prompt, or via double clicking it, but it does not run fine with the built in launcher for some reason. It runs the same command over and over again - batch file code below
Code:
@echo off
goto option%lights%
:option1:
echo Main lights on
"C:\Program Files\Common Files\X10\Common\ahcmd.exe" sendrf c2 on
c:\windows\system32\setx lights 2
exit
:option2:
echo movie lights ON
"C:\Program Files\Common Files\X10\Common\ahcmd.exe" sendrf c1 on
echo main lights off
"C:\Program Files\Common Files\X10\Common\ahcmd.exe" sendrf c2 off
c:\windows\system32\setx lights 3
exit
:option3:
echo movie lights off
"C:\Program Files\Common Files\X10\Common\ahcmd.exe" sendrf c1 off
c:\windows\system32\setx lights 1
exit
The Ahcmd.exe is a dos command tool to send X10 commands through my USB X10 Controller CM19a
Setx is a microsoft tool for setting environmental variables that are persistant (rather than the regular set command, which only sets the variable for the current window) - for some reason the setx command is unable to set the environmental variable for the whole system when run from inside Translator. (operating system = XP pro)
I'm not stuck on making my batch file work. If you have an alternate solution to accomplish the same goal, I'm game to try something else.
Australia