tag:blogger.com,1999:blog-13655284.post8168182977031887590..comments2023-06-07T07:54:11.337-05:00Comments on Geek Girl: Six minutes...jenniferhttp://www.blogger.com/profile/01975960246418403266noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-13655284.post-83554974601781610312007-06-01T21:21:00.000-05:002007-06-01T21:21:00.000-05:00oh, and don't forget to reset AppleScript's text i...oh, and don't forget to reset AppleScript's text item delimiters to ""Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-13655284.post-89152903055002597042007-06-01T21:19:00.000-05:002007-06-01T21:19:00.000-05:00set theInput to "01000100 01101111 01101110 001001...set theInput to "01000100 01101111 01101110 00100111 01110100 00100000 01010000 01100001 01101110 01101001 01100011 00101110 00001010"<BR/>set AppleScript's text item delimiters to " "<BR/>set theBytes to text items of theInput<BR/>set theWords to {}<BR/>repeat with thisByte in theBytes<BR/> set end of theWords to parse(thisByte)<BR/>end repeat<BR/>set theOutput to {}<BR/>repeat with thisWord in theWords<BR/> set end of theOutput to ASCII character thisWord<BR/>end repeat<BR/>set AppleScript's text item delimiters to " "<BR/>display dialog theOutput as text<BR/><BR/>to parse(thisByte)<BR/> set theCumulative to 0<BR/> set n to 1<BR/> set AppleScript's text item delimiters to ""<BR/> set theseBits to text items of thisByte<BR/> repeat with thisBit in theseBits<BR/> set theFlag to ((item (9 - n) of theseBits)) as integer<BR/> set thePower to 2 ^ (n - 1) as integer<BR/> set theValue to theFlag * thePower<BR/> set theCumulative to theCumulative + theValue<BR/> set n to n + 1<BR/> end repeat<BR/> return theCumulative<BR/>end parseAnonymousnoreply@blogger.com