• 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: Getting the name of a Window with non-Scriptable App?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the name of a Window with non-Scriptable App?


  • Subject: Re: Getting the name of a Window with non-Scriptable App?
  • From: Ed Stockly <email@hidden>
  • Date: Tue, 23 Sep 2008 11:09:09 -0700


Is there anyway I can have my Script Wait until this window is displayed and then keystroke the "Ok" button?


On Sep 23, 2008, at 5:06 AM, KOENIG Yvan wrote:


Isn't it what is "giving up after 2000" designed to do?

That's what giving up is designed to do for dialogs displayed by your script, it has no control over dialogs raised by an unscriptable application.


You could do a repeat loop, something like this...
------
tell application myApp
repeat
activate
tell application "System Events"
if exists button "Save" of sheet 1 of window dialogWindowName then
click button "Save" of sheet 1 of window dialogWindowName
exit repeat
else
delay 2
end if
end tell
end repeat
end tell
------


The trick is identifying the window  and button you need to click.

I would use PreFab's UI Browser to get a solid reference to the window/button, which you can paste into your script.

Apple also has similar app, but I haven't used it since I installed UI Browser.

HTH,

ES

_______________________________________________
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
References: 
 >System Events - Selecting a Folder (From: Dave <email@hidden>)
 >Re: System Events - Selecting a Folder (From: Ian Goos <email@hidden>)
 >Re: System Events - Selecting a Folder (From: Dave <email@hidden>)
 >Getting the name of a Window with non-Scriptable App? (From: Dave <email@hidden>)
 >Re: Getting the name of a Window with non-Scriptable App? (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: name of this document
  • Next by Date: kinds of services in network preferences suite
  • Previous by thread: Re: Getting the name of a Window with non-Scriptable App?
  • Next by thread: Re: Getting the name of a Window with non-Scriptable App?
  • Index(es):
    • Date
    • Thread