Creating a list ...


I want to create a list that AS will understand. The list will be created by reading a list of events belonging to Indigo. Indigo is a scriptable app. By Indigo’s standard, an event as many properties. I want to create a list of events each showing one property. The list could look like this:

{“EventName1, NextTriggerTime1”, "EventName2, NextTriggerTime2, etc …}

The script will use a REPEAT STATEMENT to pass through all events, select the ones required (based on a specific property), and finaly create a list that I will be able to search with AS.

Is this step clear enough to help me ?

Thanks in advance.


It’s hard to be specific without having Indigo installed (since I can’t see its dictionary), but it sounds like you should be able to do something like:

tell application "Indigo"
-- your code here to get the events, e.g.:
set theEvents to (get every event)

-- now setup an empty list of the data you want:
set eventList to {}
-- now loop through those events and get the data you want
repeat with eachEvent in theEvents
set eventName to name of eachEvent
set eventTrigger to next trigger time of eachEvent -- probably not the right syntax
copy ((eventName & ", " & eventTrigger) as text) to end of eventList
end repeat
end tell
return eventList