Re: Finder window properties
Re: Finder window properties
- Subject: Re: Finder window properties
- From: Jonathan Levi <email@hidden>
- Date: Sun, 14 Sep 2014 10:28:57 -0400
-----Original Message-----
From: Robert Poland <email@hidden>
To: AppleScript Users <email@hidden>
Sent: Sun, Sep 14, 2014 9:16 am
Subject: Finder window properties
Hi,
I got to wondering if there might be Finder window properties that would show
the state(?) of a finder window. So far in looking through the hundreds of
Finder
properties I haven’t found anything.
Items like Sidebar exists
Toolbar exists
Toolbar height
Folder shared
Number of Items In Window
Etc.
I know there are ways to get these but its crude and not to reliable.
TIA,
Robert Poland
iMac, Late 2013, 14,2
3.2 GHz Intel Core I5, 27”
16 GB Ram, 1TB Fusion HD
OS X 10.9.4 (13C64)
_______________________________________________
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
Robert,
I got most of the answers you're looking for in AppleScript Editor > Window > Library > Finder
(I assume you've added Finder to your list of scriptable applications in the Library window) >
Window Classes > Finder Window. Properties toolbar visible, statusbar visible, sidebar width
appear to me to work; try the following little scriptlet if you wish. My impression is that the
toolbar height is fixed, hence not a property. I don't know about shared status.
'[T]ell application "Finder" to count items' seems to work as expected.
Jonathan
--------------------------------------------------------------------------------------------------------
tell application "Finder"
activate
tell window 1
get properties
set toolbar visible to (not toolbar visible)
set statusbar visible to (not statusbar visible)
if statusbar visible then
delay 1
set sidebar width to 100
end if
count items
end tell
end tell
delay 1
activate
--------------------------------------------------------------------------------------------------------
_______________________________________________
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