• 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: I didn't tell AppleScript Editor to do anything!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I didn't tell AppleScript Editor to do anything!


  • Subject: Re: I didn't tell AppleScript Editor to do anything!
  • From: "koenig.yvan" <email@hidden>
  • Date: Tue, 22 Jan 2013 16:27:58 +0100


Le 22/01/2013 à 15:44, Alex Zavatone <email@hidden> a écrit :


On Jan 22, 2013, at 9:34 AM, koenig.yvan wrote:

I'm a bit puzzled.

button 1 of window "Network"
is the close button of this window so it would be difficult for the script to trigger 
button "Apply" of sheet 1 of window "Network"

So I guess that you wanted to trigger an other button than the first one.

If this is true, then there are two tools that should help you out a bunch.

UIElementInspector from Apple and UI Browser from Bill Cheeseman/PFiddlesoft

http://pfiddlesoft.com/

I can send you a copy of UIElementInspector in a zip since it is Apple sample code



Here I use the Accessibility Inspector.app embedded in the free Xcode.app.
Macintosh HD:Applications:Applications_MAS:Xcode.app:Contents:Applications:Accessibility Inspector.app:

When the Network pane was open, I ran this script :

tell application "System Events" to tell application process "System Preferences"
name of every window
--> {"Réseau"}
tell window 1
subrole of buttons
--> {"AXCloseButton", "AXZoomButton", "AXMinimizeButton", missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value}
name of buttons
--> {missing value, missing value, missing value, "Pour empêcher les modifications, cliquez ici.", "Assistant…", "Revenir", "Appliquer", missing value, "Avancé…", "Ajouter un service", "Supprimer un service"}
end tell
end tell

Réseau is the French name for the Network pane.
As you may see, the first button is really the close one.

Yvan KOENIG (VALLAURIS, France) mardi 22 janvier 2013 16:26:14


 _______________________________________________
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

  • Follow-Ups:
    • Re: I didn't tell AppleScript Editor to do anything!
      • From: Steve Thompson <email@hidden>
    • Re: I didn't tell AppleScript Editor to do anything!
      • From: Alex Zavatone <email@hidden>
References: 
 >I didn't tell AppleScript Editor to do anything! (From: Steve Thompson <email@hidden>)
 >Re: I didn't tell AppleScript Editor to do anything! (From: "koenig.yvan" <email@hidden>)
 >Re: I didn't tell AppleScript Editor to do anything! (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: I didn't tell AppleScript Editor to do anything!
  • Next by Date: Writing Mailbox Behaviors
  • Previous by thread: Re: I didn't tell AppleScript Editor to do anything!
  • Next by thread: Re: I didn't tell AppleScript Editor to do anything!
  • Index(es):
    • Date
    • Thread