step 1: click on the button that you want to assign the variable to step 2: in the macro window, select the icon that says V=1 step 3: Action Variable Setting window opens up, click on Add New step 4: Type "TV is On" inside the name window that pops up, then click OK. step 5: click close to close the action variable setting window. step 6: at the botton of the macro window, change the Type to Variable step 7: notice there are now two tabs, False and True. click on false step 8: insert your TV power on code into the macro followed by the necessary delay step 9: click on the V=1 button in the macro window, click on TV is On, choose True, then click on Set. step 10: finish setting up your macro with the neccessary input selection step 11: Click on the True tab at the bottom of the macro window step 12: create the same macro that you did in step 9, except don't insert the delay this time step 13: click on the button that will power off the system step 14: add the power off code for the tv to the macro window and any other power off codes that you need to power down the system. step 15: click on V=1 in the macro window, select TV is On, this time choose false.
Congrats, you just set up a power tracking variable.
Basically, any time you tell the remote to send the TV Power On command, you need to follow it with setting the TV is On variable to True. When you send the Power Off command, follow that with TV is On variable set to false.
(edit: i goofed up on my first list, step 6 was a copy/paste error. i fixed it. I hope it didn't confused anyone)