• 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: Tue, 13 Mar 2001 04:22:07 -0500

Seems to me that there is an app on VersionTracker called something like
App Attachment or some such thing that can do this; but I can't seem to find
it. Age is a terrible thing; but it beats the alternative.

Oh, well ...
how about a simple idle handler?

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

> From: Sander Tekelenburg <email@hidden>
> Date: Tue, 13 Mar 2001 08:52:18 +0100
> To: email@hidden
> Subject: Re: detect launch of file?
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> At 09:45 -0800 UTC, on 12/03/2001, Phil Calvert 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.
>
> I wouldn't know, but I doubt it. However, it _is_ possible to ask the Finder
> whether or not an application is running[*]. If by "file type" you don't mean
> it in the general sense, but a file that is specific to an application, then
> perhaps this is a viable route to take. (Because opening a file would
> activate the application).
>
> This would mean having to use a stay-open applet that uses an "on idle"
> handler so it will continuously checks for changes.
>
>
> [*]
> tell app "Finder"
> get processes
> end
>
>
> HTH
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBOq3RsOsywKfXgqKdEQJifQCg3ddQS9jbLKIITJmGQzMzwMwZV8QAoNA5
> M2r8kwAOtdbfR0zzeX+auoEX
> =GVyi
> -----END PGP SIGNATURE-----
> --
> Sander Tekelenburg, <mailto:email@hidden>
> Web site at <http://www.euronet.nl/~tekelenb/>
>
> Mac user: "Macs only have 40 viruses, tops!"
> PC user: "SEE! Not even the virus writers support Macs!"
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


References: 
 >Re: detect launch of file? (From: Sander Tekelenburg <email@hidden>)

  • Prev by Date: Re: Opening all Quark docs in a designated folder
  • Next by Date: Re: Telnet
  • Previous by thread: Re: detect launch of file?
  • Next by thread: Re: detect launch of file?
  • Index(es):
    • Date
    • Thread