Re: Calling an application
Re: Calling an application
- Subject: Re: Calling an application
- From: JollyRoger <email@hidden>
- Date: Sun, 11 Feb 2001 13:54:55 -0600
on 2/11/2001 7:06 AM, Andrew Wylie at email@hidden wrote:
>
Are thier jaws dislocated from yawning?
Probably. The "Where is application?" / double tell / raw event code topic
has been covered many many times, in many different ways, some quite
recently, on this list.
>
Is it in the archives?
If it isn't, it's not because it hasn't been discussed. ;) Feel free to
search.
>
By "doesn't fail in this situation" I mean it doesn't fail with -1713 if the
>
app is located on a desktop other than the startup disk and *can only
>
confirm it here* but strongly suspect it could fail elsewhere and am curious
>
as to when and how.
>
>
so I'd be grateful if the most experienced here might elaborate.
I'll bite. :)
-1713 is errAENoUserInteraction (No user interaction allowed). So it would
seem that the app you were telling was not located on the same machine, and
needed to display a dialog. If that is the case, then an error of -1713 is
a perfectly normal and valid response. You can't provoke via a script user
interaction (a dialog) on another machine.
>
tell application "Finder" to open application file id "ASRe"
>
tell application "Apple Software Restore"
>
--[Do Stuff]
>
end tell
Why doesn't this result in the "Where is app?" dialog on your particular
setup? Because the Finder was able to locate an app a) with that creator
and b) with the same name as the app you made reference to when you compiled
the script. If either of those changed, however, even the script you
provided will display the "Where is app?" dialog.
Is your goal to prevent ANY "Where is app?" dialogs from being displayed?
If so, then about the only thing that really works in ALL situations is the
"raw event code" method. if you are interested in learning more about this
subject, please say so, or search the archives for the following keywords:
double tell
raw event code
where is application
HTH
JR