Today, I did my first steps using macros in translator. Very nice feature, indeed! Now, I'm stuck with an issue.
What do I want to achieve?
When sending MP in standby, I would like the system to check whether my beamer is on and if yes, turn it off.
How do I try to achieve this?
In order to achieve this, I use two macros.
Macro (1) sets a variable var_xyz = yes when turning on my beamer.
Macro (2) checks whether var_xyz == yes as soon as I send the system into standby.
Macro (1):
Macro (2) looks as follows and is assigned to the PC_Suspend event:
The issue
Sending my computer into standby using my MCE remote's PC button does not leave enough time to fire the two IR blasts needed for turning off my beamer. The PC goes too fast into standby mode.
Any hints about how I could solve this - probably with a completely different approach?
Thx in advance,
G.
What do I want to achieve?
When sending MP in standby, I would like the system to check whether my beamer is on and if yes, turn it off.
How do I try to achieve this?
In order to achieve this, I use two macros.
Macro (1) sets a variable var_xyz = yes when turning on my beamer.
Macro (2) checks whether var_xyz == yes as soon as I send the system into standby.
Macro (1):
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<macro>
<item command="If: var_BeamerOn|==|Yes|TurnOffBeamer|TurnOnBeamer" />
<item command="Label: TurnOffBeamer" />
<item command="Blast: SwitchBeamer|Both" />
<item command="Blast: SwitchBeamer|Both" />
<item command="Set Variable: var_BeamerOn|No" />
<item command="Goto Label: End" />
<item command="Label: TurnOnBeamer" />
<item command="Blast: SwitchBeamer|Both" />
<item command="Set Variable: var_BeamerOn|Yes" />
<item command="Label: End" />
</macro>
Macro (2) looks as follows and is assigned to the PC_Suspend event:
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<macro>
<item command="If: var_BeamerOn|==|Yes|TurnOffBeamer|End" />
<item command="Label: TurnOffBeamer" />
<item command="Blast: SwitchBeamer|Both" />
<item command="Blast: SwitchBeamer|Both" />
<item command="Set Variable: var_BeamerOn|No" />
<item command="Label: End" />
</macro>
The issue
Sending my computer into standby using my MCE remote's PC button does not leave enough time to fire the two IR blasts needed for turning off my beamer. The PC goes too fast into standby mode.
Any hints about how I could solve this - probably with a completely different approach?
Thx in advance,
G.