Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Fire AppleScript in response to System Events

Fire AppleScript in response to System Events
Thread Tools
Forum Regular
Join Date: Dec 2004
Status: Offline
Reply With Quote
Feb 27, 2005, 05:34 AM
 
Hi all,

Just curious where I might find some info on getting an AppleScript to launch in response to a system GUI event, like the opening of a window.

Thanks!

Rob
     
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Feb 27, 2005, 09:49 AM
 
The finder does not provide callback functions like this, and AppleScript is not generally the sort of language you would want to use callbacks in. You would have to use a haxie to expose this behavior.

Short answer: you can't.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Feb 27, 2005, 11:20 AM
 
If this is for Finder windows, it can be accomplished with folder actions.
     
rslifka  (op)
Forum Regular
Join Date: Dec 2004
Status: Offline
Reply With Quote
Feb 27, 2005, 04:33 PM
 
Hmm...

I was hoping to do something like this:

when safari opens a window, is it a password prompt window?
if so, fill the dialog with the appropriate values and press OK

I got all excited thinking about how easy this could be with applescript, and that nothing like this would be possible w/out considerable pain on the PC platform... ah well.

Rob
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:12 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2