• 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
Attempting to intervene in the "Close" process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Attempting to intervene in the "Close" process


  • Subject: Attempting to intervene in the "Close" process
  • From: Cosgrave Valentine <email@hidden>
  • Date: Thu, 1 Apr 2010 11:22:40 +0100

Is it possible through scripting to intervene after a windows red close button is clicked ?

The IF statement in the theoretical script (not a solution) below demonstrates what I am trying to do. It would, at first glance, appear possible as most programs will bring up a "Save" dialog after a windows red close button has been clicked - that is, if the user has made any changes.

The Non -Solution

on idle
tell application "Microsoft Word"
activate
end tell
tell application "System Events"
if click button 4 of window "Word Document" of process "Microsoft Word" is true then
display dialog "Remember to....." with title ("Reminder") buttons {"OK"} default button "OK" cancel button "OK"
rest of script here

end if
end tell
return 0.05
end idle

Grateful for any ideas

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

This email sent to email@hidden

  • Prev by Date: Re: Property lists and System Events (was: no subject)
  • Next by Date: Re: Property lists and System Events (was: no subject)
  • Previous by thread: Re: Property lists and System Events (was: no subject)
  • Next by thread: Re: Read/Write Text Files
  • Index(es):
    • Date
    • Thread