Re. Strange Finder behaviour...
Re. Strange Finder behaviour...
- Subject: Re. Strange Finder behaviour...
- From: Joe <email@hidden>
- Date: Wed, 18 Jun 2008 10:23:04 -0700
David Crowe wrote:
The following behaviour seems strange to me:
tell application "Finder"
set Window1Name to name of window 1
repeat with aWindow in every window
display dialog ">" & name of aWindow as string
end repeat
end tell
The "display dialog" displays the name of a file in the Finder
window, not the name of the Finder window.
On the second time through the repeat loop it generates an error
saying "Finder got an error: Can't get name of item 2 of every
window".
This seems to work OK.
tell application "Finder"
set Window1Name to name of window 1
set x to name of every window
repeat with thiswindow in x
display dialog thiswindow
end repeat
end tell
Joe
_______________________________________________
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