Applescript Scripting Error
Put quite simply I am trying to make an applescript in OS X that will let me cycle through a list of URLs to make a playlist of the songs I want to play. Each song should open a new page in Safari that goes straight to a youtube page. I don't know how to structure the last command line that would repeat the act of cycling through the whole list. Here is the script:
(* Apologize, Hall of Fame, Eye of the Tiger, Bon Jovi - Livin' on a Prayer, Somebody Told Me -the Killers, Ocena Avenue, The Reason, Since u been gone, Comin' home, Speed of Sound, the chronicles of life and death ,mr. brightguy,hanging by a moment,how you remind me,wherever you go,suddenly I see,behind blue eyes,I’m with you,someday -nickelback,The Fighter -Gym Class Heroes ft Ryan Tedder
*)
set myPlaylist to {"https://youtu.be/yGpGsG8bvWk", "https://youtu.be/jukv9Q1eR2g", "https://youtu.be/btPJPFnesV4", "https://youtu.be/lDK9QqIzhwk", "https://youtu.be/p4_1t5jjo4w", "https://youtu.be/9S5LA_c6WT8", "https://youtu.be/p4_1t5jjo4w", "https://youtu.be/R7UrFYvl5TE", "https://youtu.be/vCbQ_4PxM0E", "https://youtu.be/bnfRq69nKEA", "https://youtu.be/w08_Riw8vN4", "https://youtu.be/SrkeWsQZNyU", "https://youtu.be/a4_woZ-LUvM", "https://youtu.be/yyLsPdOEBww", "https://youtu.be/ThaW-YMFVus", "https://youtu.be/fEGI9NbH-mk", "https://youtu.be/1aFied2YYVg", "https://youtu.be/kmFWDUQMj-g", "https://youtu.be/8TzCLpgbJ_g"}
set Apologize to item 1 of myPlaylist
set HallofFame to item 2 of myPlaylist
set EyeoftheTiger to item 3 of myPlaylist
set LivingonaPrayer to item 4 of myPlaylist
set SomebodyToldMe to item 5 of myPlaylist
set OceanAvenue to item 6 of myPlaylist
set TheReason to item 7 of myPlaylist
set SinceuBeenGone to item 8 of myPlaylist
set ComingHome to item 9 of myPlaylist
set SpeedofSound to item 10 of myPlaylist
set TheChroniclesofLifeandDeath to item 11 of myPlaylist
set MrBrightguy to item 12 of myPlaylist
set HangingbyaMoment to item 13 of myPlaylist
set HowYouRemindMe to item 14 of myPlaylist
set WhereverYouGo to item 15 of myPlaylist
set SuddenlyISee to item 16 of myPlaylist
set BehindBlueEyes to item 17 of myPlaylist
set ImWithYou to item 18 of myPlaylist
set Someday to item 19 of myPlaylist
set TheFighter to item 20 of myPlaylist
The error message is
Syntax Error
Expected expression but found "repeat"
tell application "Safari" to makenewdocumentwith properties {URL:repeat myPlaylist}
Honestly I don't know why it won't work, do I need to structure the ending command line differently or what? Any help would be greatly appreciated, I have been scripting in Applescript proficiently for a few months now but this has me completely thrown for a loop (pun intended).
MacBook Air