Re: Talk to Indigo via IChat on Leopard
Posted: Tue Apr 05, 2011 12:53 pm
From the usage example in the script:
I don't see it either, so I assumed it must have been handled by the last else block, which seems to just pass thru what you say:
If the quoting was correct somehow that would allow you to just pass thru applescript to indigo (just the turn on portion as we're already inside of a tell block):
The later versions hard code all of this in else statements, which is simple but less elegant and means you need to update the script with all of your devices and add to it when you add new ones. It would be much nicer to just pass applescript thru if possible.
- Code: Select all
set theResponse to "Available Commands: flash, bedtime, tail log,turn on/off [device],
I don't see it either, so I assumed it must have been handled by the last else block, which seems to just pass thru what you say:
- Code: Select all
else
tell application "IndigoServer"
set result to (run script theMessage) as string
end tell
If the quoting was correct somehow that would allow you to just pass thru applescript to indigo (just the turn on portion as we're already inside of a tell block):
- Code: Select all
-- tell application "IndigoServer"
turn on "Office Lamp"
-- end tell
The later versions hard code all of this in else statements, which is simple but less elegant and means you need to update the script with all of your devices and add to it when you add new ones. It would be much nicer to just pass applescript thru if possible.