Re: eventTrigger [v1.2.0 Beta]
I see, then it gets trickier... Do you really need individual light control inside MP? In that case it is probably easiest to buy a second Tellstick and have one in each computer.
On the second topic, my idea assumes that you use a remote to turn on the TV and the projector. If that is the case, EventGhost could detect those events and "know" which one you are using. Are you using a single remote (Harmony or similar?) or an MCE remote together with the original TV and Proj remotes? Try loading the Keyboard or the General HID plugins in EG and see if it detects the TV On and Proj On IR codes from the remote.
The EG code would then look something like this:
Autostart
eg.globals.TVOn = False
eg.globals.ProjOn = False
TVOn Macro
MCERemote.TV On (or whatever the event you get when you push the TV On remote)
eg.globals.TVOn = True
eg.globals.ProjOn = False
ProjOn Macro
MCERemote.Proj On (or whatever the event you get...)
eg.globals.ProjOn = True
eg.globals.TVOn = False
and then when you get MP events from the trigger plugin:
MP Light Control Macro
Main.MP.Movie.Play
If eg.globals.TVOn == True:
Tellstick.TurnOff.1 (TV lights off)
Else:
Tellstick.TurnOff.2 (Projector lights off)
Hope you get the idea.
Similarly, you could implement the Disable function by adding a variable in Autostart, set it using some unused button on your remote and check for it in the MP event:
Autostart
eg.globals.LightControlEnabled = True
Picking up the remote key:
Enable Macro (toggles the enabled/disabled state)
MCEUnusedButtonPressed
If eg.globals.LightControlEnabled == True:
eg.globals.LightControlEnabled = False
Else:
eg.globals.LightControlEnabled = True
And in the MP event:
MP Light Control Macro
Main.MP.Movie.Play
If eg.globals.LightControlEnabled == True:
If eg.globals.TVOn == True:
Tellstick.TurnOff.1 (TV lights off)
Else:
Tellstick.TurnOff.2 (Projector lights off)
Of course this is just "pseudo code" to illustrate the ideas, but hopefully it will guide you in the right direction. For more advanced scripting, check out the EG forum at www.eventghost.net . Lots of really good and helpful people there!
Finally, I saw you using .bat files in your example. You should not need to use bat-files, better to do everything right in EG!
Good luck!
I see, then it gets trickier... Do you really need individual light control inside MP? In that case it is probably easiest to buy a second Tellstick and have one in each computer.
On the second topic, my idea assumes that you use a remote to turn on the TV and the projector. If that is the case, EventGhost could detect those events and "know" which one you are using. Are you using a single remote (Harmony or similar?) or an MCE remote together with the original TV and Proj remotes? Try loading the Keyboard or the General HID plugins in EG and see if it detects the TV On and Proj On IR codes from the remote.
The EG code would then look something like this:
Autostart
eg.globals.TVOn = False
eg.globals.ProjOn = False
TVOn Macro
MCERemote.TV On (or whatever the event you get when you push the TV On remote)
eg.globals.TVOn = True
eg.globals.ProjOn = False
ProjOn Macro
MCERemote.Proj On (or whatever the event you get...)
eg.globals.ProjOn = True
eg.globals.TVOn = False
and then when you get MP events from the trigger plugin:
MP Light Control Macro
Main.MP.Movie.Play
If eg.globals.TVOn == True:
Tellstick.TurnOff.1 (TV lights off)
Else:
Tellstick.TurnOff.2 (Projector lights off)
Hope you get the idea.
Similarly, you could implement the Disable function by adding a variable in Autostart, set it using some unused button on your remote and check for it in the MP event:
Autostart
eg.globals.LightControlEnabled = True
Picking up the remote key:
Enable Macro (toggles the enabled/disabled state)
MCEUnusedButtonPressed
If eg.globals.LightControlEnabled == True:
eg.globals.LightControlEnabled = False
Else:
eg.globals.LightControlEnabled = True
And in the MP event:
MP Light Control Macro
Main.MP.Movie.Play
If eg.globals.LightControlEnabled == True:
If eg.globals.TVOn == True:
Tellstick.TurnOff.1 (TV lights off)
Else:
Tellstick.TurnOff.2 (Projector lights off)
Of course this is just "pseudo code" to illustrate the ideas, but hopefully it will guide you in the right direction. For more advanced scripting, check out the EG forum at www.eventghost.net . Lots of really good and helpful people there!
Finally, I saw you using .bat files in your example. You should not need to use bat-files, better to do everything right in EG!
Good luck!