Re: detecting when an app is beach-balling
Re: detecting when an app is beach-balling
- Subject: Re: detecting when an app is beach-balling
- From: Martin Redington <email@hidden>
- Date: Mon, 22 Oct 2007 12:14:27 +0100
yep, that wil send a misc/actv event to the app, and activate it
(starting it if its not started already, or bringing it to the front
otherwise).
I don't actually want to activate it though - just to see if its
spinning (on the assumption that if it replies to an event, its not
spinning).
ascr/gdte seems to do what I want for running apps, but not for non-
scriptable apps (I'm presuming that I'll only be polling running apps).
On 22 Oct 2007, at 11:38, Ron Fleckner wrote:
Just to clarify,
-- begin AppleScript
tell application "AnyApplication"
activate
end
-- end AppleScript
will start up any app, whether it's scriptable or not. Of course,
you have to name your target app properly, that is, substitute a
real name for "AnyApplication".
Ron
On 22/10/2007, at 7:59 PM, Martin Redington wrote:
Thanks. That looks like it would work for scriptable apps
(although I haven't tried it against a beachballer), but not for
non-scriptable ones.
Spin Control doesn't seem to do any polling - it just seems to be
waiting for a callback or notification of some kind - presumably
that's in some private API.
On 20 Oct 2007, at 18:34, Emanuele ∞ Vulcano wrote:
Il giorno 20/ott/07, alle ore 17:35, Martin Redington ha scritto:
I was hoping that there might be some kind of no-op Apple Event
that I could despatch to it, to see whether I get a reply or
not, but I can't spot anything in the docs ...
There is certainly one -- the one that is dispatched by
AppleScript when you tell app "SomeApp" to run.
- ∞
AE2000 (1058): Sending an event:
------oo start of event oo------
{ 1 } 'aevt': ascr/gdte (i386){
return id: 69337094 (0x4220006)
transaction id: 0 (0x0)
interaction level: 64 (0x40)
reply required: 1 (0x1)
remote: 0 (0x0)
for recording: 0 (0x0)
target:
{ 2 } 'psn ': 8 bytes {
{ 0x0, 0x4600001 } (Address Book)
}
fEventSourcePSN: { 0x0,0x45e0001 } (osascript)
optional attributes:
< empty record >
event data:
{ 1 } 'aevt': - 1 items {
key '----' -
{ 1 } 'long': 4 bytes {
0 (0x0)
}
}
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
40ozemail.com.au
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden