• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How do I do this? (Converting class property to class list)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I do this? (Converting class property to class list)


  • Subject: How do I do this? (Converting class property to class list)
  • From: Steve Thompson <email@hidden>
  • Date: Fri, 03 Apr 2009 17:00:31 +0100

I know why this doesn't work

tell application "Finder"
bounds of every window
name of every window
every window whose bounds is {658, 277, 1539, 777}
end tell


Result

tell application "Finder"
get bounds of every window
{{658, 277, 1539, 777}, {488, 123, 1369, 623}}
get name of every window
{"Macintosh HD", "Applications"}
get every window whose bounds = {658, 277, 1539, 777}
"Finder got an error: Can’t make {658, 277, 1539, 777} into type Unicode text."





AppleScript can't convert class property in to a list. Or it doesn't know how to. But the only way I can see round this is to cycle through the windows, get the bounds and convert it to a list using some "applescript item delimiters" and a bit of "every item of". Is there a simpler way that I can't see?

Thanks

Steve
 _______________________________________________
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

  • Follow-Ups:
    • Re: How do I do this? (Converting class property to class list)
      • From: Yvan KOENIG <email@hidden>
  • Prev by Date: Re: Contextual menus
  • Next by Date: Re: How do I do this? (Converting class property to class list)
  • Previous by thread: Re: Parallel Processing in AppleScript
  • Next by thread: Re: How do I do this? (Converting class property to class list)
  • Index(es):
    • Date
    • Thread