FasdUAS 1.101.10 k l mg Script for automatically extracting calendar items from meeting requests and adding them into iCal.  l  l  w k l i I .emalcpmanull@mssg o 0 themessages theMessages  pmar o 0theruletheRule k l ~ path to which to save the tmp file. This may need to be changed, AppleScript's handling of paths leaves much to be desired  r  c !" !l # #b $% $l& &c'( 'l) )I* .earsffdralis afdr *m  afdrdocs (m  TEXT %m+ +temp_invite.ics "m  TEXT o 0thepaththePath,- ,O./ .X01 0k"2234 3r"'56 5l"%7 7n"%89 81#%  raso 9o"# 0 themessage theMessage 6o 0 thesource theSource4:; :l((< < Find the range of the message source that is an ics message Note: this works both on messages that detect the .ics attachement, and on crappy Exchange invites that show up as an owa url. ;=> =r(3?@ ?l(1A AI(1B .sysooffslongnullBCD  psof Cm*+E EBEGIN:VCALENDARDF  psin Fo,- 0 thesource theSource @o 0 vcalbegin vcalBegin>GH Gr4EIJ I[4CKL Kl4=M Ml4=N NI4=O .sysooffslongnullOPQ  psof Pm67R R END:VCALENDARQS  psin So89 0 thesource theSource Ll=BT Tl=BU Un=BVW V1>B  leng Wm=>X X END:VCALENDAR Jo 0vcalendvcalEndHYZ YlFF[ [ Get the ics data Z\] \rFU^_ ^lFS` `nFSab a7GScd  ctxt coMO 0 vcalbegin vcalBegin doPR 0vcalendvcalEnd boFG 0 thesource theSource _o 0 theinvite theInvite]ef elVVfgh glVVi i Only deal with requests hjk jZVlmn l=Vcop olVaq qlVar rIVas .sysooffslongnullstu  psof tmX[v vMETHOD:REQUESTuw  psin wo\] 0 theinvite theInvite pmab mlffx x do nothing  nkjyyz{ zljj| | write to a temp file {}~ }rju Ijs .rdwropenshorfile ojk 0thepaththePath  perm mno  boovtrue o 0fh~ Iv .rdwrwritnull**** ovw 0 theinvite theInvite  refn oz{ 0fh  as m~  TEXT I .rdwrclosnull**** o 0fh l l l )# search and replace in textwrangler O k I .miscactv******** I .aevtodocnullalis 4  file o 0thepaththePath  LFtx m  boovtrue I .R*chRepl******** m  TZID=".*"  Repl m TZID="Australia/Brisbane"  FnIn n 4  ctxt m 4  TxtD m  Opts K  SMod m  SModGrep  STop m  boovtrue  Wrap m  boovfals  Rvrs m  boovfals  Case m  boovfals  Wrds m  boovfals  ExSl m  boovfals I .coresave******** 4  TxtD m~~} I|{z |.aevtquit********{z} mnull߀TextWrangler.appa?@?@&?@?@`?^!Rchalisd Macintosh HDk%H+TextWrangler.appc ApplicationsjFj*Macintosh HD:Applications:TextWrangler.app"TextWrangler.app Macintosh HDApplications/TextWrangler.app/ lyxyx lww  open in iCal  O Ivu v.aevtodocnullalis lt os s0thepaththePathtu mnulliCal.app[ǐ^̐@@wrbtalisD Macintosh HDk%H+iCal.appFT ApplicationsjZ"Macintosh HD:Applications:iCal.appiCal.app Macintosh HDApplications/iCal.app/ lrr  delete the file  O I qp q.coredeloobj obj l o o n n0thepaththePathop m null# Finder.app^DME8CMACSalisr Macintosh HDk%H+ Finder.appB CoreServicesj6n 3Macintosh HD:System:Library:CoreServices:Finder.app Finder.app Macintosh HD&System/Library/CoreServices/Finder.app/m llklkmkj lihihj 0 themessage theMessage 1og g0 themessages theMessages /mnullMail.app ×)l2P7຃`5ė2-×(s×emalalisD Macintosh HDk%H+Mail.appھM ApplicationsjM*`"Macintosh HD:Applications:Mail.appMail.app Macintosh HDApplications/Mail.app/-f lededf  lcbcba l`_`_a^^] ].emalcpmanull@mssg\[ZY \.emalcpmanull@mssg [0 themessages theMessagesZXWV X pmar W0theruletheRuleV UTSRQPONM U0 themessages theMessages T0theruletheRule S0thepaththePath R0 themessage theMessage Q0 thesource theSource P0 vcalbegin vcalBegin O0vcalendvcalEnd N0 theinvite theInvite M0fh4LKJ+IHGFEEDCBRXA@v?>=<;:9876543210/.-,+*)('&%$ L afdrdocs K.earsffdralis afdr J TEXT I kocl H cobj G.corecnte******** F raso E psof D psinC B.sysooffslongnull A leng @ ctxt ? perm >.rdwropenshorfile = refn < as ;.rdwrwritnull**** :.rdwrclosnull**** 9.miscactv******** 8 file 7 LFtx 6.aevtodocnullalis 5 Repl 4 FnIn 3 TxtD 2 Opts 1 SMod 0 SModGrep / STop . Wrap - Rvrs , Case + Wrds * ExSl)( '.R*chRepl******** &.coresave******** %.aevtquit******** $.coredeloobj obj Y j &%&EO  [l kh,EO* EO* a,EO[a\[Z\Z2EO*a jhYael EOaa Oj Oaj*j O*a/ael Oaaa a!*a"k/ak/a#a$a%a&ea'fa(fa)fa*fa+fa,a- .O*a"k/j /O*j 0UOa1j UOa2j 3UOPOP[OYUOPascr ޭ