Finder window toolbar
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.