• 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
Finder preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Finder preferences


  • Subject: Finder preferences
  • From: Yvan KOENIG <email@hidden>
  • Date: Mon, 5 Jun 2017 18:32:33 +0200

I'm tired by asker complaining that a script doesn't work as it's supposed to do because they uncheck the preferences checkbox urging the app to display the extension names.
I know how to check this box thru GUIScripting but I don't find a way to force the app to apply this new setting.

tell application "System Events" to tell process "Finder"
set frontmost to true
keystroke "," using {command down}
tell window 1
--class of UI elements --> {pop up button, checkbox, checkbox, checkbox, checkbox, checkbox, static text, static text, button, button, button, toolbar, static text}
tell toolbar 1
--class of UI elements--> {button, button, button, button}
--name of buttons--> {"Général", "Tags", "Barre latérale", "Options avancées"}
click button 4
end tell # toolbar 1
if value of checkbox 1 = 0 then
click checkbox 1
# code forcing Finder to apply the new setting
end if
end tell # window 1
end tell # System Events …


Is one of you knowing the correct incantation ?

Thanks in advance.


Yvan KOENIG running Sierra 10.12.5 in French (VALLAURIS, France) lundi 5 juin 2017 18:32:30

 _______________________________________________
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: Finder preferences
      • From: "Stockly, Ed" <email@hidden>
    • Re: Finder preferences
      • From: David Gregg <email@hidden>
  • Prev by Date: Re: Getting class-name: Error when converting to string
  • Next by Date: Re: Finder preferences
  • Previous by thread: Re: Getting class-name: Error when converting to string
  • Next by thread: Re: Finder preferences
  • Index(es):
    • Date
    • Thread