Re: disclosure triangle detection
Re: disclosure triangle detection
- Subject: Re: disclosure triangle detection
- From: Robert Poland <email@hidden>
- Date: Mon, 20 Jun 2011 12:53:44 -0600
Jim,
This counts visible items in a finder window.
Here's what works for me;
... my doGUIScriptingCommands() -- Select all in window set itemsInWindow to selection set countOfItemsInWindow to length of itemsInWindow ...
to doGUIScriptingCommands() activate application "Finder" tell application "System Events" tell process "Finder" -- insert GUI Scripting statements here tell menu 1 of menu bar item "Edit" of menu bar 1 click menu item "Select All" end tell end tell end tell end doGUIScriptingCommands
On Jun 20, 2011, at 9:29 AM, Jim Brandt wrote: I use the list view in almost all my Finder windows.
I want to write a script that sets the bounds of the window based on the number of items being shown in the list view. However, counting the number of items in the frontmost window only works if there are no folders in the window with the disclosure triangle toggled to show the contents of said folder. If it's toggled, I need to add the count of the number of items in that folder also (and so on down for all imbedded folders).
Is there a property of a folder in a list view that tells me that the disclosure triangle is toggled to display the contents of the files in that folder also? I couldn't find an obvious candidate in the Finder SDEF.
BTW, in case it matters, I'm running OSX 10.4.11 on a PowerPC G4 Dual 450.
TIA,
Jim Brandt
Robert Poland - Fort Collins, CO
|
_______________________________________________
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