• 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
Expected to get a list, but got an array instead
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Expected to get a list, but got an array instead


  • Subject: Expected to get a list, but got an array instead
  • From: Lists <email@hidden>
  • Date: Wed, 10 Jun 2015 00:01:16 -0700

Nothing I can’t deal with, but I got an unexpected result from this line of script. 

tell application "Safari"
set x to URL of every tab of (every window where its document is not missing value)
end tell

I’m unclear why this is returning a nested list instead of just a list. Adding one more line to the script gets the list I want:

set y to item 1 of x

Thanks
J
 _______________________________________________
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: Expected to get a list, but got an array instead
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: Setting default printer request.
  • Next by Date: Re: Expected to get a list, but got an array instead
  • Previous by thread: Re: Setting default printer request.
  • Next by thread: Re: Expected to get a list, but got an array instead
  • Index(es):
    • Date
    • Thread