Re: Slightly OT: simulating a dock icon click via an AppleEvent (or otherwise)
Re: Slightly OT: simulating a dock icon click via an AppleEvent (or otherwise)
- Subject: Re: Slightly OT: simulating a dock icon click via an AppleEvent (or otherwise)
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 06 Dec 2005 05:45:19 -0500
- Thread-topic: Slightly OT: simulating a dock icon click via an AppleEvent (or otherwise)
on 2005-12-05 10:34 PM, Mark Aufflick at email@hidden wrote:
>
when you click on the dock icon, skype reacts with exactly the
>
behaviour I want which got me wondering if there is any system
>
standard way to send a "dock icon click" event to an application?
Using GUI Scripting, you can do this:
tell application "System Events"
tell process "Dock"
click UI element "Stickies" of list 1
end tell
end tell
All you need to know is the name of the Skype button, which is presumably
"Skype", and substitute it for "Stickies" in the above example. You can get
the names of all the Dock buttons with this script:
tell application "System Events"
tell process "Dock"
get name of every UI element of list 1
end tell
end tell
This assumes you're running Mac OS X 10.4 Tiger.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software -
http://www.prefab.com/scripting.html
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden