MLHSPLugin|HS_DisableEvent

MFuller
New Member
New Member
Posts: 39
Joined: Fri Sep 16, 2005 9:30 am
Contact:

MLHSPLugin|HS_DisableEvent

Postby MFuller » Thu Mar 08, 2007 11:44 am

Hey Guys,

I'm trying to setup a macro for a button. One part of the macro requires that I enable an event. The code is currently...

Code: Select all


MLServeCmd.MLConditional|IsEqual##{{tglV1}}##off##Macro|SetVariable|tglV1~On!MLHSPlugin|HS_SetDeviceString:V1~Enabled##Macro|SetVariable|tglV1~Off!MLHSPlugin|HS_SetDeviceString:V1~Disabled




Now I have an event that I would like to enable and disable when the button is pressed. So I was planning to changing it to this...

Code: Select all

MLServeCmd.MLConditional|IsEqual##{{tglV1}}##off##Macro|SetVariable|tglV1~On!MLHSPlugin|HS_SetDeviceString:V1~Enabled!MLHSPlugin|HS_EnableEvent:E - Security Sunset Lights##Macro|SetVariable|tglV1~Off!MLHSPlugin|HS_SetDeviceString:V1~Disabled!MLHSPlugin|HS_DisableEvent:E - Security Sunset Lights


Would this work ? Now the part I am worried about is the spaces in the event name. when entered into the code window on a button it looks all wrong.

User avatar
jjjukebox
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1024
Joined: Sat May 22, 2004 9:54 pm
Location: Toronto
Contact:

Postby jjjukebox » Thu Mar 08, 2007 3:39 pm

First of all you dont use "Macro" in this code the way you have. The best way would to use command maps in your conditional.

Eg: MLServeCmd.MLConditional|IsEqual##{{tglV1}}##off##CommandMap1##CommandMap2

CommandMap1 = MLServeComd.Macro|SetVariable|tglV1~On!MLHSPlugin|HS_SetDeviceString:V1~Enabled!MLHSPlugin|HS_EnableEvent:E - Security Sunset Lights

CommandMap2 = MLServeComd.Macro|SetVariable|tglV1~Off!MLHSPlugin|HS_SetDeviceString:V1~Disabled!MLHSPlugin|HS_DisableEvent:E - Security Sunset Lights


or use this without command maps

MLServeCmd.Macro|MLConditional|IsEqual##{{tglV1}}##off##SetVariable|tglV1~On##SetVariable|tglV1~Off!MLConditional|IsEqual##{{tglV1}}##off##MLHSPlugin|HS_SetDeviceString:V1~Enabled##MLHSPlugin|HS_SetDeviceString:V1~Disabled!!MLConditional|IsEqual##{{tglV1}}##off##MLHSPlugin|HS_EnableEvent:E - Security Sunset Lights##MLHSPlugin|HS_DisableEvent:E - Security Sunset Lights

I am assuming all your MLHSPlugin commands are correct.

Just a thought.
J.J. Jukebox
Member


Return to “Homeseer”

Who is online

Users browsing this forum: No registered users and 1 guest