FasdUAS 1.101.10 k l @: AppleScript to scan the currently-visible page in Safari, l  C= download any linked .mp3 files, and import them into iTunes.  l   l GA WARNING: you must have "Copy files into iTunes Music Folder when l <6 adding to Library" checked in the iTunes preferences. l l JD Written by Alastair, http://girtby.net/offerings/import-linked-mp3s l  Version of 2005-05-17 l l ?9 Licensed under the Creative Commons Attribution License, ! l" "60 see http://creativecommons.org/licenses/by/2.0/!#$ #l$%& %l' 'LF Change this to the name of the playlist you want to add new tracks to&() (j* 0 playlistname playlistName *m+ +Podcasts),- ,l-./ .l0 0O12 1k3345 4l567 6l8 85/ look in the description for linked music first79: 9r ;< ;n => =1  conT >4?  docu ?m <o 0html:@ @r AB An CD C1  pURL D4 E  docu Em Bo 0pageurlpageURL 2mFFnullc Safari.appր%(֠w)<($xsfrialisL Macintosh HDXH+ Safari.appY. Applications@$Macintosh HD:Applications:Safari.app Safari.app Macintosh HDApplications/Safari.app//GH GlHIJ Il"K Kr"LM Ln NO N1  psxp OlP PIQR .earsffdralis afdr QmS S tempRT  from Tm  fldmfldu Mo 0 tempfolder tempFolderJUV Ul#(W Wr#(XY Xm#$Z Z" Yn[\ [1%'  txdl \1$%  ascrV]^ ]l)-_ _r)-`a `J)+ ao 0theurlstheURLs^bc blcde dl.7f fr.7gh gn.3ij i2/3  citm jo./ 0html ho 0 theitemlist theItemListekl kl8{m mX8{no nZNvpq pFNjrs rFN_tu tCNSvw voNO 0i wmORx x http: uDV[yz yoVW 0i zmWZ{ { .mp3 sHbf| |Ebe}~ }obc 0theurlstheURLs ~ocd 0i qrmr bmp omn 0theurlstheURLs ono 0i o 0theurlstheURLs 0i oo;> 0 theitemlist theItemListl l l| r| m| / n 1  txdl 1  ascr l l Z = n 1  leng o 0theurlstheURLs m k I .sysodlogaskrTEXT m No Linked MP3s found  btns J m OK  dflt m OK  disp m  stic L l l r J o 0thefilestheFiles l9 X9 k4 r n 4  citm m o 0u o 0filename l l GA URL Access Scripting doesn't handle fileURLs (see TN2022), so we l F@ use old skool file specifications instead. These have a maximum l C= length of 32 chars, so let's adjust the filename accordingly Z ? n 1  leng o 0filename m r b l n 7  ctxt m m o 0filename m .mp3 o 0filename O( t ' r& I" .aevtdwnlfss TEXT o 0u  fdst l b o 0 tempfolder tempFolder o 0filename  prog m  boovtrue o 0thefiletheFile m , mnull߷*URL Access Scripting.app(w,)<($xuascalis Macintosh HDXH+*URL Access Scripting.appcW ScriptingAdditionse * GMacintosh HD:System:Library:ScriptingAdditions:URL Access Scripting.app2URL Access Scripting.app Macintosh HD:System/Library/ScriptingAdditions/URL Access Scripting.app/ r)4 b)0 o),~ ~0thefilestheFiles o,/} }0thefiletheFile o| |0thefilestheFiles 0u o{ {0theurlstheURLs lzyzy lxx =7 now have a list of downloaded files in the temp folder l:w O: k@ l@@vv *$ add the playlist if it doesn't exit Z@put H@O l@Ns I@Nrq r.coredoexboolobj 4@Jp p cPly oDIo o0 playlistname playlistNameqs IRlnm n.corecrel****nullml l kocl mVYk k cUsPji j prdt K\f  h g h pnam  o_df f0 playlistname playlistNamegiut   lqqeded    lqqcc  finally add the track rq Iqb b.hookAdd cTrk@alis oqta a0thefilestheFiles`_ ` insh 4w^ ^ cPly o{] ]0 playlistname playlistName_ o\ \0 thetracks theTracks l[Z[Z lYY # make it a list, then iterate Z XW >!" !n#$ #mV V pcls $oU U0 thetracks theTracks "mT T list  r%& %J''(S (oR R0 thetracks theTracksS &oQ Q0 thetracks theTracksXW)P )X*O+ *k,,-. -lN/N /! play with genre here? naah.01 0lMLML123 2lK4K 4+% set the comment field to the pageURL35J 5r67 6oI I0pageurlpageURL 7n89 81H H pCmt 9oG G0tJ O0t +oF F0 thetracks theTracksP m:=::nullsߠ iTunes.appր%(֠xw)<($xhookalisL Macintosh HDXH+ iTunes.app8 Applicationsx$Macintosh HD:Applications:iTunes.app iTunes.app Macintosh HDApplications/iTunes.app/w;< ;lEDED<=> =l?C ?X@BA @OBC BIAD@ A.coredeloobj obj Do? ?0f@ CmEEnull! Finder.appp%(Ր w$)<($xMACSalisr Macintosh HDXH+ Finder.app7߾Z CoreServicesW 3Macintosh HD:System:Library:CoreServices:Finder.app Finder.app Macintosh HD&System/Library/CoreServices/Finder.app/ B0f Ao> >0thefilestheFilesC>F= Fl<;<;=:G+H:G98 90 playlistname playlistName 8.aevtoappnull****H7I65JK4 7.aevtoappnull**** IkLL.MMINNUOO]PPdQQkRRSSTTUUVVWW=3365J210/ 20i 10u 00t /0fK>F.-,+*S)('&%Z$#"! x{ : E . docu - conT ,0html + pURL *0pageurlpageURL ) from ( fldmfldu '.earsffdralis afdr & psxp %0 tempfolder tempFolder $ ascr # txdl "0theurlstheURLs ! citm 0 theitemlist theItemList  kocl  cobj .corecnte********  bool  leng  btns  dflt  disp  stic .sysodlogaskrTEXT 0thefilestheFiles  0filename  ctxt,  fdst  prog  .aevtdwnlfss TEXT 0thefiletheFile  cPly .coredoexboolobj  cUsP  prdt  pnam .corecrel****null  insh .hookAdd cTrk@alis 0 thetracks theTracks  pcls  list  pCmt .coredeloobj obj 4*k/,EO*k/,EUOl ,EO,FOjvEOa-E`OB_[aal kha aa& Ϡ a& Ϡ%EYh[OYOa,FOa,j%aaakvaaaa a! "OhYhOjvE`#O~[aal khai/E`$O_$a,a%_$[a&\[Zk\Za%2a'%E`$YhOa(a)na*_$%a+ea, -E`.oUO_#_.%E`#[OYOa/*a0b/j 1 *aa2a3a4bla, 5YhO_#a6*a0b/l 7E`8O_8a9,a:_8kvE`8YhO!_8[aal khŢa;,F[OYUO&_#[aal kha<j =U[OYascr ޭ