Your Universal Remote Control Center
RemoteCentral.com
Complete Control by URC Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 2 made on Sunday June 17, 2007 at 19:19
Daniel Tonks
Wrangler of Remotes
Joined:
Posts:
October 1998
28,781
To make this easer I suggest creating specific CABLE ON and CABLE OFF macros which you then reference from your master power macros.

First, create your PWRCABLE variable.

Power On
For your CABLE ON macro set the macro type to VARIABLE and then choose the PWRCABLE variable. Select the VARIABLE=0 macro tab (this means "variable not set").

Put your toggle POWER code in here.

Now add a second step to the macro with the VARIABLE tool button. Select the PWRCABLE variable and choose "SET 1".

Power Off
Now for your CABLE OFF macro, again set the macro type to VARIABLE, choose the PWRCABLE variable, and then select the VARIABLE=1 macro tab (this means "variable is set", which we just configured the previous macro to do with the "SET 1" option).

Put your power toggle in here, and then use the VARIABLE tool button to set PWRCABLE to "SET 0".

How this works
When you run the "Power On" macro it first checks the state of the PWRCABLE variable. If it is set to "0" it looks for commands on the "VARIABLE=0" macro tab, and finds that it should send the POWER command and then change the variable to "1". So, if the macro is run a second, third or fourth time when it checks the variable it now shows as "1". There are no commands on the "VARIABLE=1" tab, so nothing will happen and the device will remain on.

Then, when we run the "Power Off" macro, it finds that the PWRCABLE variable has been set to "1" (specifically from the "On" macro). So, it looks on the "VARIABLE=1" tab and does everything there, which includes setting the PWRCABLE variable back to 0. So if "Off" is run again, it now looks on the "VARIABLE=0" tab, finds nothing, and the device stays off.

Hope this helps.


Hosting Services by ipHouse