• 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: Slightly OT: simulating a dock icon click via an AppleEvent (or otherwise)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Slightly OT: simulating a dock icon click via an AppleEvent (or otherwise) (From: Mark Aufflick <email@hidden>)

  • Prev by Date: Re: images bundled with framework
  • Next by Date: Double-clicking multiple selection in a TableView
  • Previous by thread: Re: Slightly OT: simulating a dock icon click via an AppleEvent (or otherwise)
  • Next by thread: How to draw a Sector Using Cylinder Using OpenGL
  • Index(es):
    • Date
    • Thread