Retrieving Indigo events ...

Posted on
Sun Dec 23, 2012 2:47 pm
rlesperance offline
Posts: 333
Joined: Dec 01, 2004
Location: Québec, Canada

Retrieving Indigo events ...

Hi Matt,

In Indigo 1.8.2 (a long long time ago ...) I was able the retrieve Indigo’s events and setup a wake up schedule in the Power Manager application. Now my old script does not work. I changer Indigo for IndigoServer, but still can get the event list. Can you help me with what is not working ? Here is my previous script:


Code: Select all
tell application "IndigoServer"
   repeat with i in time date actions
      if i is enabled then
         if name of i does not contain "internal" then
            
            -- ... copy the name and the scheduled time of the event, ...
            --- ... copier le nom et le moment de déclanchement de l'événement, ...
            set EventName to name of i
            set NextTrigger to (next trigger time) of i
            
            --- ... in Power Manager, delete all event that already exist with the same name ...
            --- ... détruire tout événement déjà existant dans Power Manager portant le même nom ...
            LogToIndigo(EventName, "& ", NextTrigger)
         end if
      end if
   end repeat
end tell


-- Routine to log text in Indigo
--  Permet d'inscrire un texte dans le log d'Indigo
on LogToIndigo(theTextToLog)
   tell application "IndigoServer"
      log theTextToLog
   end tell
end LogToIndigo

Posted on
Mon Dec 24, 2012 10:44 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Retrieving Indigo events ...

To get the script running here I just had to change this line:

Code: Select all
            LogToIndigo(EventName, "& ", NextTrigger)

to:

Code: Select all
            my LogToIndigo(EventName, "& ", NextTrigger)

Image

Posted on
Mon Dec 24, 2012 6:06 pm
rlesperance offline
Posts: 333
Joined: Dec 01, 2004
Location: Québec, Canada

Re: Retrieving Indigo events ...

Hi Matt ... In the script editor, I always get an code -10810 error message. Any idea what could be the problem ?

Posted on
Mon Dec 24, 2012 6:12 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Retrieving Indigo events ...

Unfortunately, no. I was running it in the Script Editor as well. I'm not sure what the difference is between our configurations (this Mac is running OS X 10.7.5). I googled on that error and there were lots of hits, but nothing jumped out as particularly useful.

I'd suggest you try reducing the script down to see what exactly is causing it to fail.

Image

Posted on
Mon Dec 24, 2012 6:17 pm
rlesperance offline
Posts: 333
Joined: Dec 01, 2004
Location: Québec, Canada

Re: Retrieving Indigo events ...

I tried this simple script :

Code: Select all
tell application "IndigoServer"
   log "hello"
end tell



... and got the same error. I will have to dig this error.

Posted on
Mon Dec 24, 2012 6:20 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Retrieving Indigo events ...

What version of Indigo and Mac OS are you running? There is a problem with older versions of Indigo and Mountain Lion. It is fixed in Indigo 5.1.5 and Indigo 6.

Image

Posted on
Mon Dec 24, 2012 6:34 pm
rlesperance offline
Posts: 333
Joined: Dec 01, 2004
Location: Québec, Canada

Re: Retrieving Indigo events ...

I am using Indigo 5.1.7 and OS 10.8.2 ...

Posted on
Mon Dec 24, 2012 6:53 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Retrieving Indigo events ...

That should be good. Choose Indigo->About Indigo just to make sure that Indigo Server is 5.1.7. Sometimes the client/server versions get out of sync.

Image

Posted on
Mon Dec 24, 2012 7:25 pm
rlesperance offline
Posts: 333
Joined: Dec 01, 2004
Location: Québec, Canada

Re: Retrieving Indigo events ...

Both are v5.1.7 ...

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests