Re: Can not get "item" from "position"
Re: Can not get "item" from "position"
- Subject: Re: Can not get "item" from "position"
- From: Michelle Steiner <email@hidden>
- Date: Wed, 4 Apr 2007 08:56:19 -0700
On Apr 4, 2007, at 8:40 AM, Andrei Tchijov wrote:
tell application "Finder"
set targetWindow to the front window
position of targetWindow
end tell
It's a tricky thing; you're getting a result that looks like one
thing, but is actually another.
tell application "Finder"
set targetWindow to the front window
class of position of targetWindow
end tell
--> property
In other words, position is a property, not a list. So you need to
cast the property into a list:
tell application "Finder"
set targetWindow to the front window
item 1 of (position of targetWindow as list)
end tell
The parentheses are important; it won't work without them.
-- Michelle
--
"So why did you do it?
"Cause I was told not to"
_______________________________________________
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