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

Finder window toolbar


  • Subject: Finder window toolbar
  • From: Paul Skinner <email@hidden>
  • Date: Thu, 17 Jul 2003 12:09:40 -0400

I can toggle the Finder window's toolbars.

<script>
on toggleToolbar(windowReference)
tell application "System Events"
tell process "Finder"
activate
select windowReference
click (the first button of the front window whose subrole is "AXToolbarButton")
end tell
end tell
end toggleToolbar
</script>

But can anyone tell me how to tell if it's visible or collapsed?
This seems to be just about enough to make me nauseous.

<script>
tell application "Finder"
my toolbarVisible(window 1)
end tell

on toolbarVisible(windowReference)
tell application "Finder"
activate
set a to bounds of windowReference
my toggleToolbar(windowReference)
set b to bounds of windowReference
set toolbarVisible to ((item 4 of a) > (item 4 of b))
my toggleToolbar(windowReference)
return toolbarVisible
end tell
end toolbarVisible

on toggleToolbar(windowReference)
tell application "System Events"
tell process "Finder"
activate
select windowReference
click (the first button of the front window whose subrole is "AXToolbarButton")
end tell
end tell
end toggleToolbar
</script>
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Finder window toolbar
      • From: John Delacour <email@hidden>
References: 
 >Re: Scripting PS7 (From: Dave Balderstone <email@hidden>)

  • Prev by Date: Re: Finding Installed Memory Total
  • Next by Date: upgraded Applescript in Panther
  • Previous by thread: Re: Scripting PS7
  • Next by thread: Re: Finder window toolbar
  • Index(es):
    • Date
    • Thread