Re: applescript-users digest, Vol 3 #1840 - 16 msgs
Re: applescript-users digest, Vol 3 #1840 - 16 msgs
- Subject: Re: applescript-users digest, Vol 3 #1840 - 16 msgs
- From: Jean-Baptiste LE STANG <email@hidden>
- Date: Fri, 18 Jul 2003 08:11:21 +0200
This parameter should be in the com.apple.finder.plist file, you have
to edit this file and search for the key wich says if the Toolbar is
visble or not, the from applescript you will be able to get this value
using 'defaults' and 'do shell script'.
@+ JB
Le vendredi, 18 jul 2003, ` 04:38 Europe/Paris,
email@hidden a icrit :
Message: 10
Reply-To: email@hidden
Date: Thu, 17 Jul 2003 23:04:34 +0100
To: email@hidden
From: John Delacour <email@hidden>
Subject: Re: Finder window toolbar
At 4:16 pm -0400 17/7/03, Paul Skinner wrote:
On Thursday, July 17, 2003, at 02:11 PM, John Delacour wrote:
At 12:09 pm -0400 17/7/03, Paul Skinner wrote:
I can toggle the Finder window's toolbars.
[...]
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.
I should have been more specific above.
Can anyone tell me how to tell if the finder window's TOOLBAR is
visible or collapsed?
I have already told you, but the property is obviously not available
in 10.2.6. 'collapsed' is a property not of the toolbar (which is
not a class) but of the 'finder window'. 'toolbar visible' is (will
be) also a property of 'finder window'.
So far as I can see, the AX properties of the button don't change
when you press it so I can't see any way of doing it except by taking
the position of the window after clicking the button twice.
Unfortunately unless you delay, the values are not updated in time.
If you run this with the delay, you will get two different values in
ls (or I do) but without the delay you won't. Maybe there's a way
round this.
tell application "Finder"
end tell
set ls to {}
repeat 2 times
tell application "System Events"
tell process "Finder"
tell window 1
click button 1
set end of ls to item 1 of (get position)
end tell
end tell
end tell
delay 1
end repeat
end
ls
The line...
set its toolbar visible to false
throws an error OMM (AS 1.9.1 / System Events 1.2 / OS 10.2.6)...
'A property can't go after this identifier.'
JD
_______________________________________________
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.