Re: how to return to app ?
Re: how to return to app ?
- Subject: Re: how to return to app ?
- From: Emmanuel <email@hidden>
- Date: Sat, 28 Jul 2001 23:49:21 +0200
At 17:34 +0200 27/07/01, Bee wrote:
>
>
I have an applet in the Apple Menu which modifies the text on the
>
clipboard and it works well.
>
>
When I use it, the focus is changed to finder, which makes some sense,
>
but I would like to be returned to the application I was using before
>
running the applet.
>
>
How do I do that?
Here is an excerpt from a script where we do so.
It is testing if the OS is 9.1, because the Finder comes front whenever our
script uses the "original item" property, only with 9.1, and then we have
to switch back to the original process.
---------------------------------------
tell application "Finder" to set antibug to ((computer "sysv") is 2320)
if antibug then tell application "Finder" to set theSavedProcess to (first
process whose frontmost is true) as text -- antibug OS 9.1
[... your script here ...]
if antibug then tell application "Finder" to set frontmost of process
theSavedProcess to true -- antibug OS 9.1
---------------------------------------
HTH
Emmanuel