FasdUAS 1.101.10 k l E? -------------------------------------------------------------- l   Paste to iCal   l   Brian Hargreaves.   l E? -------------------------------------------------------------- l l =7 This script gets the selected date from the clipboard, l @:and makes a new event in iCal. It prompts for the name of l >8the iCal event, and which iCal calendar it should be in. l l  E? --------------------------------------------------------------!" !l"#$ #l% %'!Get Selected Date from clipboard.$&' &l ( (r )* )c+, +l- -I .JonsgClp****@null ,m  ctxt *o 0 selecteddate'./ .l/01 0l2 2?9This section allows parsing with a perl script to extract134 3l5 5E?all dates from text. It doesn't work perfectly, and installing467 6l8 8<6the perl script means this script doesn't stand alone.79: 9l; ;/)For now it is commented out by "if false":<= <l=>? >l@ @71if length of selecteddate is greater than 20 then?AB AlBCD Cl JE EZ JFGH Fm  boovfals GkDIIJK JrLM LlN NIO .sysoexecTEXTTEXT ObPQ PbRS RmT T echo  SnUV U1  strq Vo 0 selecteddate QmW W("| /Users/brian/bin/extractdates.pl Mo 0 processedtextKXY XlYZ[ Zr%\] \I#^ 0 texttolist TextToList^_` _o 0 processedtext`a amb b-- ]o 0datelist[cd cl&&de eZ&Dfgh f?&+ij in&)kl k1')  leng lo&' 0datelist jm)* gr.9mn mc.7op ol.5q qI.5rs .gtqpchltTEXT@@TEXT ro./ 0datelistst  prmp tm01u u Choose a Date pm56  ctxt no 0 chosendate hr<Dvw vn<Bxy x4=Bz  cobj zm@A yo<= 0datelist wo 0 chosendate HrGJ{| {oGH 0 selecteddate |o 0 chosendateD}~ }l~ l ]Wdisplay dialog "Date to add is " & chosendate buttons {"Cancel", "Ok"} default button 2 l lKZ IKZ .sysodlogaskrTEXT bKP mKN Enter Event Name on  oNO 0 chosendate  dtxt mSV   l[f r[f n[b 1^b  ttxt 1[^  rslt o 0 eventname l lg Og km Imr .miscactvnullnull Is .wrbtaec9nullobj   wtdt 4w}  ldt o{| 0 chosendate l r l e 2  wres o 0 allcalendars r c n 1  leng o 0 allcalendars m  long o 0 numcalendars r J n 1  wr02 n 4  cobj m o 0 allcalendars o 0calendartitles Z ? o 0 numcalendars m Y s n 1  wr02 n 4  cobj o 0i o 0 allcalendars l n ; o 0calendartitles 0i m l o 0 numcalendars l l :4display dialog "name is " & eventname buttons ("Ok") l~}~} r c l| I{ {.gtqpchltTEXT@@TEXT oz z0calendartitlesyx y prmp lw b m Choose a calendar for  ov v 0 eventnamewx| mu u ctxt ot t0 chosentitle lsrsr lqq C=display dialog "You selected " & (chosentitle) buttons {"Ok"} lpopo r c mnn mm m long ol l 0 calnumber Y)kj Z $ih =  n  4g g cobj of f0i o e e0calendartitles od d0 chosentitle r  oc c0i ob b 0 calnumberih k0i maa l` n 1_ _ leng o^ ^0calendartitles`j l**]\]\ l**[Z[Z  Y  Z*  XW  ?*/   o*-V V 0 calnumber m-.UU  k2 l22TSTS r2S l2OR I2OQP Q.corecrel****nullPO O kocl m69N N wrevML M insh n<I ;HI n<H 2DHK K wrev 4<DJ J wres o@CI I 0 calnumberLR oH H0theitemtheItem !  ITdG"# G.wrbtaec1nullobj "oTWF F0theitemtheItem#E$D E tosd $4Z`C% C ldt %o^_B B0 chosendateD!&' &IeuA() A.wrbtaec9nullobj (oeh@ @ 0 calnumber)?*> ? wtdt *4kq=+ = ldt +oop< <0 chosendate>',- ,lvv;:;:-./ .Ov01 0r|23 2o|9 9 0 eventname 318 8 wr11 1ovy7 70theitemtheItem/46 4I554 5.wrbtaec3nullobj 5o3 30theitemtheItem46XWY mgj66null߀ iCal.app@0L7p CP)(K CwrbtalisD Macintosh HD,H+ iCal.app gx Applications-/4  "Macintosh HD:Applications:iCal.appiCal.app Macintosh HDApplications/iCal.app/78 7l212189: 9l0/0/:;< ;i=> =I.?- .0 texttolist TextToList?@A @o, ,0thetexttheTextAB+ Bo* *0 thedelimiter theDelimiter+- >k3CCDE DrFG FnHI H1) ) txdl I1( ( ascr Go' '0 savedelim saveDelimEJK JQ*LMN Lk OOPQ Pr RS RJ TTU& Uo % %0 thedelimiter theDelimiter& SnVW V1 $ $ txdl W1 # # ascrQX" XrYZ Yn[\ [2! ! citm \o 0thetexttheText Zo 0thelisttheList" MR]^ .ascrerr ******** ]o 0errstrerrStr^_  errn _o 0errnumerrNum Nk*``ab ar#cd co 0 savedelim saveDelim dnef e1 "  txdl f1   ascrbg gR$*hi .ascrerr ******** ho() 0errstrerrStrij  errn jo&' 0errnumerrNumKkl kr+0mn mo+, 0 savedelim saveDelim nnop o1-/  txdl p1,-  ascrlq qL13r rl12s so12 0thelisttheList  <tu tl   uvw vlwx xlyz{y 0 texttolist TextToList .aevtoappnull****z>|} 0 texttolist TextToList~~ 0thetexttheText 0 thedelimiter theDelimiter| 0thetexttheText 0 thedelimiter theDelimiter 0 savedelim saveDelim 0thelisttheList 0errstrerrStr 0errnumerrNum}  ascr  txdl  citm 0errstrerrStr  errn 0errnumerrNum  errn4,EOkv,FO-EWX,FO)lO,FO{ .aevtoappnull**** k&C 0i0TWbu6 .JonsgClp****@null  ctxt 0 selecteddate  strq .sysoexecTEXTTEXT 0 processedtext 0 texttolist TextToList 0datelist  leng  prmp .gtqpchltTEXT@@TEXT 0 chosendate  cobj  dtxt .sysodlogaskrTEXT  rslt  ttxt 0 eventname .miscactvnullnull  wtdt  ldt .wrbtaec9nullobj  wres 0 allcalendars  long 0 numcalendars  wr02 0calendartitles 0 chosentitle 0 calnumber  kocl  wrev  insh .corecrel****null 0theitemtheItem  tosd .wrbtaec1nullobj  wr11 .wrbtaec3nullobj *j &EOf;,%%j EO*l+ EO,kl &EY ak/EYEOa%aal O_a,E`Oa'*j O*a*a/l O*a-EE`O_,a&E` O_ak/a!,kvE`"O_ k'!l_ kh_a/a!,_"6G[OYYhO_"a#_%l &E`$Oja&E`%O+k_",Ekh_"a/_$ E`%Yh[OYO_%ja*a&a'a(*a_%/a'-6a) *E`+O_+a,*a/l -O_%a*a/l O_+ _*a.,FUO_+j /YhUascr ޭ