Re: Home to top of the list.
Re: Home to top of the list.
- Subject: Re: Home to top of the list.
- From: Robert Poland <email@hidden>
- Date: Sat, 16 May 2009 14:20:37 -0600
Thanks Philip,
Not to sure what your solution is...
What I want to do is tell window 1 of the finder to select the top (first) item of the list display regardless of whether it is in the name view or not.
The reason is I want the window to scroll to the top rather that select some random point. Then when I click the zoom button the display will show the top viewable portion of the window.
On May 16, 2009, at 12:09 PM, Philip Aker wrote: On 2009-05-16, at 09:07:58, Robert Poland wrote: This works to home to top of folder IF IT'S SET TO NAME VIEW.
tell application "Finder" -- home to top of folder tell window 1 to select item 1 ...
If in a "date modified" view it still homes to the first item by name and not the top of the list.
Is there a command that will do this?
I'm having trouble interpreting the problem description. I think you mean something like the following (which will have to be changed if the sort direction is descending):
set hf to path to home folder tell application "Finder" set top to date ("Jan 24, 1984") set dlist to modification date of every item of hf repeat with i from 1 to count of dlist set d to item i of dlist if (d is greater than top) then set top to d end if end repeat set tlist to every item of hf whose modification date is top reveal item 1 of tlist end tell
Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@ Democracy: Two wolves and a sheep voting on lunch.
Bob 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