Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
Re: detect launch of file?
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Re: detect launch of file?
Subject
:
Re: detect launch of file?
From: "Bryan" <
email@hidden
>
Date: Wed, 14 Mar 2001 14:34:44 -0500
And that OSAX is...
Survey Says...
"OpenedFiles Addition"!
>
on 3/12/01 11:45 AM, Phil Calvert (email@hidden) wrote:
>
>
> Is there any way (via applescript) to detected the launch of a file? I want
>
> an applescript to do something only if a certain file type is launched.
>
>
Hi Phil,
>
>
In the future, it would help avoid confusion if you would use the correct
>
terminology. You don't "launch" files, you "open" them. Also, you should
>
refer to applications as "applications" or "application files", not "files".
>
>
If you just want to detect when a certain application launches, you will
>
need to monitor the running "processes", as Bryan <email@hidden> has
>
already shown:
>
>
on idle
>
tell application "Finder"
>
if name of processes contains "SimpleText" then
>
--do your stuff here
>
tell me to quit
>
end if
>
end tell
>
return 1
>
end idle
>
>
If you want to know when a particular "file" is open (not an application,
>
but a simple file), then that will be harder to accomplish. You *may* be
>
able to detect it by checking the opened state of the file periodically; but
>
I doubt that functionality exists in plain vanilla AppleScript; so you'll
>
probably need to use a scripting addition.
>
>
HTH
>
>
JR
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
Prev by Date:
to restate: check list routine
Next by Date:
Re: upgrade issues: 8.1 --> X
Previous by thread:
Re: detect launch of file?
Next by thread:
Re: detect launch of file?
Index(es):
Date
Thread