| Author |
Message |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
 Embedded script not working in 10.6
I'm sure (almost) this script worked in 10.5 but not since going 10.6.
What did I screw up?
- Code: Select all
if (value of variable "garageTemperature" is greater than 64) then -- do whatever you need to do here turn on "GI10 FanGarageUp" log "GI10 FanGarageUp ON - temp is " & value of variable "garageTemperature" else turn off "GI10 FanGarageUp" log "GI10 FanGarageUp OFF - temp is " & value of variable "garageTemperature" end if
Produces this error: - Code: Select all
Error script error: around characters 22 to 23 Error script error: Expected “,” but found “"”. (-2741)
I'm basically turning a fan on/off based on variable garageTemperature. The fan is plugged into an Insteon appliance module.
TIA
|
| Sat Sep 26, 2009 11:24 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
 Re: Embedded script not working in 10.6
hwitten wrote:I'm sure (almost) this script worked in 10.5 but not since going 10.6. What did I screw up? - Code: Select all
if (value of variable "garageTemperature" is greater than 64) then -- do whatever you need to do here turn on "GI10 FanGarageUp" log "GI10 FanGarageUp ON - temp is " & value of variable "garageTemperature" else turn off "GI10 FanGarageUp" log "GI10 FanGarageUp OFF - temp is " & value of variable "garageTemperature" end if
Produces this error: - Code: Select all
Error script error: around characters 22 to 23 Error script error: Expected “,” but found “"”. (-2741)
I'm basically turning a fan on/off based on variable garageTemperature. The fan is plugged into an Insteon appliance module. TIA
If you try to run that in an external script (or from Script Editor) you'll get that error because it's not inside a tell to IndigoServer block. I also ran it as an embedded script in an action group and it executed fine.
Where/how is the script actually executing?
_________________ Jay (Indigo Support)
|
| Sun Sep 27, 2009 7:52 am |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
It's a" Trigger" on "variable changes", "Always", "Execute AppleScript" and the code is "Embedded".
|
| Sun Sep 27, 2009 9:31 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
hwitten wrote:It's a" Trigger" on "variable changes", "Always", "Execute AppleScript" and the code is "Embedded".
Odd. Like I said, it's working for me. Try these and let me know the results of each:
1) Select the trigger event and click on the "Execute Actions Now" button at the bottom of the screen.
2) Open the trigger event, select the Actions tab, make some trivial change to the script (add then remove a space or something) and click the "Compile" button.
3) Enclose the whole script in a tell to IndigoServer block then click on the "Run" button.
_________________ Jay (Indigo Support)
|
| Sun Sep 27, 2009 1:58 pm |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
I'll try that in a bit. Thanks Jay. Yard work first while it's still sunny out
Are you running 10.5 or 10.6?
|
| Sun Sep 27, 2009 2:14 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
hwitten wrote:I'll try that in a bit. Thanks Jay. Yard work first while it's still sunny out  Are you running 10.5 or 10.6?
10.6.1
_________________ Jay (Indigo Support)
|
| Sun Sep 27, 2009 5:24 pm |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
This is frustrating.
Same error, no matter what.
Adding a comma after variable moved the error but no clean compile without commenting the 'turn off' in the else.
I'm going to go back to the mini tomorrow, if it's inside weather  , and start over. It's still on 10.5.
Jay, is your 10.6.1 a clean 10.6 install or upgrade.
Mine was an upgrade. Wonder if that could have caused the grief.
Grrrr.
|
| Sun Sep 27, 2009 9:19 pm |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11675 Location: Texas
|
Have you tried a Restart of the Mac? Maybe it has gotten into a bad state.
_________________
|
| Sun Sep 27, 2009 9:36 pm |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
Did another in case I had missed a restart earlier in the heat of battle.
No diff 
|
| Sun Sep 27, 2009 9:55 pm |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
Back on the Mini, 10.5.8, Indigo 4 beta 2, 2412 controller.
Will upgrade to beta 4 once I get the Mini settled down.
iMac (the 'troublemaker') is turned off, 2414 unplugged from hydro.
Just a double-check.
After getting the Mini up I started a re-sync. Am I doing it correctly?
Interface --> Start Sync INSTEON Device Links...
or should I be using the Sync in Preferences --> Interface Options?
The script works as an embedded. Wasn't dreaming/having a nightmare after all 
|
| Sun Sep 27, 2009 10:45 pm |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11675 Location: Texas
|
hwitten wrote:Just a double-check. After getting the Mini up I started a re-sync. Am I doing it correctly? Interface --> Start Sync INSTEON Device Links... or should I be using the Sync in Preferences --> Interface Options?
Do the first one from the Interface menu. It'll have an option to sync everything. The one in the Interface Options dialog only syncs the PowerLinc's links and not the remote modules.
_________________
|
| Tue Sep 29, 2009 6:01 pm |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
Lucked out. Didi it right
Thanks
|
| Tue Sep 29, 2009 7:46 pm |
|
|