Re: (no subject)
Re: (no subject)
- Subject: Re: (no subject)
- From: Matt Neuburg <email@hidden>
- Date: Tue, 10 Aug 2004 06:57:12 -0700
On 09 Aug 2004 18:12:22 -0500, Tony Meadows <email@hidden> said:
>(Relatively new to the list...)
New, evidently, to the very notion of a list.
>I'm trying to make an AppleScript application which monitors status of a
>backgrounded task. It works completely, except that the window never
>gets focus. I think the problem is that I'm using the "on opened" call.
>I have tried "became main" and "became key" (became key did NOT work...)
>but all of them seem to wait until the function is finished running
>before they give focus to the window.
>
>Basically, I'm trying to figure out how to give that window focus. It
>still updates but even if it's the only window it is greyed as if it's
>backgrounded. Is there a command, or a different function, I can use to
>achieve this?
(1) Ask on the AppleScript Studio list. This is the wrong list.
(2) Use a meaningful subject.
(3) It sounds to me like you're saying you want your app to start performing
a lengthy operation the moment it starts up, but that this delays the window
from becoming key. Your best signal that the app is ready to rock and roll,
I think, is its "did finish launching"; you might try that. But what I would
do, quite frankly, is raise a flag in "did finish launch" and do your
monitoring in the idle handler. This will allow you to start monitoring (and
lower the flag) at some timed point, e.g. half a second *after* the app has
finished launching and has gone idle. This trick is the AppleScript Studio
equivalent of delayed performance, which is sometimes used on app startup
for this very reason. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.