JohnWPB Posted June 30, 2007 Share Posted June 30, 2007 (edited) Hello all you AI guru's! I am having a problem passing info to a home automation program called Home Seer. I have read through the help files, and just can not seem to get the syntax correct. I know it has to be something simple, but it seems to be a problem with passing multiple commands on a single line, in the way the quotes or parentheses are formatted. First I opened communication with Home Seer with the following line: $hs = ObjCreate("homeseer.application") I then can get the status of a device, and the msg box show that correctly with the following lines: $MyDevice = $hs.devicestatus("A3") if $MyDevice = 3 then $MyStatus = "Off" if $MyDevice = 2 then $MyStatus = "On" if $MyDevice = 4 then $MyStatus = "Dimmed" MsgBox(0, "Status", $MyStatus) so far all is working to communicate with Home Seer to get the status of a device. The following line I am trying with AI is not working (The ExecX10 is a command Home Seer recognizes to execute a command, as you can see below that the VBscript using the same command, and it works perfectly): if $MyDevice = 3 then hs.execX10 "A3", "On" , 50 The following line, in VBscript works perfectly: if MyDevice = 3 then hs.execX10 "A3", "On" , 50 I have tried all sorts of variations with placing quotes and parentheses with no luck. Any help with the proper syntax is greatly appreciated, as I know it is something simple with the syntax that I am doing wrong here. Edited June 30, 2007 by JohnWPB Link to comment Share on other sites More sharing options...
weaponx Posted June 30, 2007 Share Posted June 30, 2007 (edited) if $MyDevice = 3 then $hs.execX10 "A3", "On" , 50- or - if $MyDevice = 3 then $hs.execX10 ("A3", "On" , 50) Edited June 30, 2007 by weaponx Link to comment Share on other sites More sharing options...
JohnWPB Posted June 30, 2007 Author Share Posted June 30, 2007 if $MyDevice = 3 then $hs.execX10 "A3", "On" , 50- or - if $MyDevice = 3 then $hs.execX10 ("A3", "On" , 50)Thank you so much! I knew it was just some sort of syntax problem! The 2nd example above worked perfectly! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now