steve harley Re: AS: Scripting Finder list views [topic hoisted]
Feb 09, 2010; 08:41
steve harley
Re: AS: Scripting Finder list views [topic hoisted]
On 2010-02-05 18:56 , Roy McCoy wrote: > I didn't realize there was a difference between window and Finder window > before,
as indicated in Finder's dictionary, window is the parent class of Finder window; so a Finder window has all the properties of a window and adds some more (there are other types of windows as well); when you refer to an object, you get access to all of its properties regardless of what class name you might have used in the object specifier
> so I'll try doing the same thing with Finder window rather than > window... Okay, that gives me the same result for the window with the > sidebar, but something more comparable for the other one: > >> {class:Finder window, [...] toolbar visible:true, [...]} > > I have no idea what the other "window" was, but will forget about it > for the time being. Anyway, the difference is... Oh dear, there isn't > any difference, the properties are identical.
you seem to have compared the properties when both windows had the toolbar and sidebar showing, that's why there was no difference
If that don't beat all. > I suppose it's in some kind of "view preferences" or something, but I > can't find it. The only "sidebar" in the Finder scripting dictionary > is the "sidebar width" of the Finder window properties, which is, > oddly, the same for the window with the sidebar as for the window > without it. In any event maybe it could be set to zero... which I > tried, but it only narrows the sidebar a little, it doesn't make it > zero width. > > Via Google I see that Snow Leopard permits the toggle and even provides > a keycode for it, cmd-opt-s.
note that Finder in 10.6 was completely rewritten, so scripting will be different in some ways too
> To toggle: > > if toolbar visible of Finder window 1 is true then > set toolbar visible of Finder window 1 to false > else > set toolbar visible of Finder window 1 to true > end if
or just toggle it using the logical _not_:
tell front Finder window to set toolbar visible to (not toolbar visible)
> Whew. It would have helped if the true state of the window had been > reflected in the listed properties to begin with, in which case I would > have had it right away.
what you've hit upon is pretty much just a weakness in the terminology; as you found, the sidebar and the toolbar are not independent; the toggle is also in the menu as Show/Hide Toolbar (cmd-opt-t)
what might be more intuitive is if the property name were "toolbar and sidebar visible"
-- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/InDesign/Browse/ Manage your subscription: http://www.ListSearch.com/InDesign/
Feb 09
steve harley Re: AS: Scripting Finder list views [topic hoisted]
Feb 09, 2010; 09:37
steve harley
Re: AS: Scripting Finder list views [topic hoisted]
Feb 09
Bret Perry Re: AS: Scripting Finder list views [topic hoisted]
Feb 09, 2010; 09:57
Bret Perry
Re: AS: Scripting Finder list views [topic hoisted]
Feb 09
steve harley Re: AS: Scripting Finder list views [topic hoisted]
Feb 09, 2010; 11:00
steve harley
Re: AS: Scripting Finder list views [topic hoisted]
Feb 11
Roy McCoy Re: AS: Scripting Finder list views [topic hoisted]
Feb 11, 2010; 17:51
Roy McCoy
Re: AS: Scripting Finder list views [topic hoisted]
Feb 11
Bret Perry Re: AS: Scripting Finder list views [topic hoisted]
Feb 11, 2010; 18:37
Bret Perry
Re: AS: Scripting Finder list views [topic hoisted]
Feb 11
Roy McCoy Re: AS: Scripting Finder list views [topic hoisted]
Feb 11, 2010; 18:50
Roy McCoy
Re: AS: Scripting Finder list views [topic hoisted]
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!