Re: Using variables to target my own newly scriptable app
Re: Using variables to target my own newly scriptable app
- Subject: Re: Using variables to target my own newly scriptable app
- From: Philip Dow <email@hidden>
- Date: Thu, 2 Feb 2006 19:45:13 +0100
Try this change to the second example:
tell application "Journler"
tell active journal
set anEntry to (the second entry)
set the displayed entry of the last tab to anEntry
end tell
end tell
That produces the error "Journler got an error: Can't make displayed
entry of last tab of active journal into type reference." Offlist it
was suggested I try "set anEntry to (get the second entry)", but that
also did not work.
I have discovered something that does work:
tell application "Journler"
tell active journal
set anEntry to entry id 2 -- rather than "set anEntry to the second
entry"
end tell
set the displayed entry of the last tab to anEntry
end tell
When setting the variable, if I refer to the entry by its unique
identifier rather than its place in a list of entries, the script
executes fine and produces the desired result. The question is then,
of course, why should referring to the variable by unique id work
when referring to it by place in a list does not. I should be dealing
with the same object, right?
-Phil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden