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

Re: Expected to get a list, but got an array instead


  • Subject: Re: Expected to get a list, but got an array instead
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 10 Jun 2015 02:41:58 -0500

On Jun 10, 2015, at 02:01, Lists <email@hidden> wrote:
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:
______________________________________________________________________

Each nested list represents the tabs of a window.

You can collapse the list of list pretty easily though:

------------------------------------------------------------------------------------
set AppleScript's text item delimiters to return
tell application "Safari"
set urlList to URL of every tab of (every window where its document is not missing value)
end tell
set urlList to paragraphs of (urlList as text)
------------------------------------------------------------------------------------

--
Best Regards,
Chris

 _______________________________________________
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

References: 
 >Expected to get a list, but got an array instead (From: Lists <email@hidden>)

  • Prev by Date: Expected to get a list, but got an array instead
  • Next by Date: Select a mail template/sjabloon
  • Previous by thread: Expected to get a list, but got an array instead
  • Next by thread: Select a mail template/sjabloon
  • Index(es):
    • Date
    • Thread