Re: Tiger: determining if a script is being run as an application
Re: Tiger: determining if a script is being run as an application
- Subject: Re: Tiger: determining if a script is being run as an application
- From: kai <email@hidden>
- Date: Mon, 6 Jun 2005 03:27:29 +0100
On Monday, June 6, 2005, at 02:42 am, Stephen Jonke wrote:
Now, and this is really weird, the following returns "application"
when run in script editor or via FastScripts, but returns "script"
when run as an application:
class of parent of parent of me
Can anyone explain this weirdness?
If my family's anything to go by, grandparents can behave very
strangely indeed... ;-)
Better, is there some reliable and unlikely to change way to determine
if your script is being run as as script application or not?
I'm not in Tiger, Stephen - but something like the following has worked
here for some time. If it still works in Tiger (and I can't think of a
reason why it shouldn't), then it's probably a fairly safe bet:
(info for (path to me))'s file creator is "aplt"
--> true (if it's a script application)
--> false (if another app is running the script)
---
kai
_______________________________________________
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