Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Catch click on dock icon ?



I think the following can be adapted to suit your needs, and does not 
require a stay open app...

Save this example as an app bundle named 'Wait'.

Peter B.

-----


-- some of your script

tell me to activate
display dialog "Do it now...?" buttons {"Cancel", "Wait", "OK"} default 
button 3
set button_pressed to button returned of result as text

if button_pressed is "Wait" then
	tell application "System Events"
		set visible of application process "Wait" to false
		repeat until visible of application process "Wait" is true
		end repeat
	end tell
end if

-- resume script on dock click

tell me to activate
display dialog "Are you sure you're ready...?" buttons {"Cancel", "OK"} 
default button 2

-- rest of script

-----

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.