• 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: Toolbar visible script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toolbar visible script


  • Subject: Re: Toolbar visible script
  • From: David Gregg via AppleScript-Users <email@hidden>
  • Date: Mon, 25 May 2020 12:50:03 -0700

Yvan is right, it is not in the standard Finder scripting dictionary.

You can use GUI scripting to accomplish the task.
This works in macOS 10.14.6, Mojave.

tell application "System Events"
        tell process "Finder"
                set frontmost to true
                delay 0.5
                click menu item 15 of menu 1 of menu bar item 5 of menu bar 1
-- Hide/Show Toolbar menu item
        end tell
end tell


> On May 25, 2020, at 11:32 AM, Yvan KOENIG via AppleScript-Users
> <email@hidden> wrote:
>
>
>
>> Le 25 mai 2020 à 20:15, iKel via AppleScript-Users
>> <email@hidden> a écrit :
>>
>> Greetings All!
>>
>> I get this error when trying to run...
>> "A property can’t go after this identifier.”
>> Perhaps this is not a sound way of doing it. Partly, just want to understand
>> property values.
>> Perhaps the use of set is better?
>>
>> My attempt to get a script to toggle toolbar visible on and off:
>>
>> property toolbarToggle: toolbar visible of application "Finder"
>> #the use of ‘set’ may be better here rather than the use of ‘property’.
>>
>> tell application "Finder"
>>      --toggle Boolean value
>>      if (toolbarToggle = false) then
>>              set toolbarToggle of the front Finder window to true
>>      else if (toolbarToggle = true) then
>>              set toolbarToggle of the front Finder window to false
>>      end if
>> end tell
>>
>>
>> I appreciate it, as always!
>>
>
> May you check in the Finder's dictionary ?
>
> As far as I remember, toolbar visible is not a property of the Finder but a
> property of a Finder window.
>
> Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) lundi
> 25 mai 2020 20:31:53
>
> _______________________________________________
> 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

 _______________________________________________
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: Toolbar visible script
      • From: Yvan KOENIG via AppleScript-Users <email@hidden>
    • Re: Toolbar visible script
      • From: Yvan KOENIG via AppleScript-Users <email@hidden>
References: 
 >Toolbar visible script (From: iKel via AppleScript-Users <email@hidden>)
 >Re: Toolbar visible script (From: Yvan KOENIG via AppleScript-Users <email@hidden>)

  • Prev by Date: Re: Toolbar visible script
  • Next by Date: Re: Toolbar visible script
  • Previous by thread: Re: Toolbar visible script
  • Next by thread: Re: Toolbar visible script
  • Index(es):
    • Date
    • Thread