Re: Silly newbie's looking for help
Re: Silly newbie's looking for help
- Subject: Re: Silly newbie's looking for help
- From: Mr Tea <email@hidden>
- Date: Sat, 13 Apr 2002 20:54:38 +0100
This from Simeon Kirov - dated 13/4/02 05.03 pm:
>
tell application "Finder"
>
if folder "MRJ Libraries" of extensions folder exists then
>
tell application "App.MAC"
>
run
>
end tell
>
else
>
tell application "Installer"
>
run
>
end tell
>
end if
>
end tell
>
>
When I run the script it hangs for 3-4 minutes and then proudly announces
>
"AppleEvent timed out.". After I close the message, the appropriate
>
application launches in the background.
How are you running the script, Simeon? In script editor? As a menu? With a
script running utility like OSA Menu?
I couldn't get your script to time out for me in OS 9.2.2 (AS 1.8.3). But
there are a couple of things you can do to clean up your script.
First, and most important - if you want an application to come to the front,
tell it to 'activate', not 'run' or 'launch'. This will have the same effect
as if you had double-clicked the app's icon.
Second, you don't need the full tell block when you are just sending a
single command to an app - you can put the commands on a single line to make
the script more compact. So a modified version of your script would look
like this:
tell application "Finder"
if folder "MRJ Libraries" of extensions folder exists then
tell application "App.MAC" to activate
else
tell application "Installer" to activate
end if
end tell
But I don't know if this will help fix your timeout problem. What kind of
beast is the App.MAC prog that you are trying to launch? That might offer a
clue.
Mr Tea
--
Brew of the day: Royal Blend
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.