Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
---------------------------------- on handle_string (facebookstatus) tell application "Keychain Scripting" set facebook_key to first Internet key of current keychain whose server is "login.facebook.com" set facebook_username to account of facebook_key set facebook_password to password of facebook_key set facebook_form_id to do shell script "curl -v -k -d email='" & facebook_username & "' -d pass='" & facebook_password & "' -d login=Login -L 'https://login.facebook.com/login.php?m&next=http%3A%2F%2Fm.facebook.com%2Fhome.php' -A 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3' --cookie- jar /tmp/facebook-cookie.txt | tr '\\"' ' ' | grep -A 2 post_form_id | tail -1" do shell script "curl -v -d post_form_id=" & facebook_form_id & " -d status='" & NewStatus & "' -d update='Update' -A 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3' --cookie /tmp/facebook-cookie.txt 'http://m.facebook.com/home.php' -L" my growlRegister() growlNotify("Facebookstatus", facebookstatus) ---------------------------------- using terms from application "GrowlHelperApp" on growlRegister() tell application "GrowlHelperApp" register as application "Facebookstatus" all notifications {"Alert"} default notifications {"Alert"} icon of application "Launchbar.app" end tell end growlRegister on growlNotify(grrTitle, grrDescription) tell application "GrowlHelperApp" notify with name "Alert" title grrTitle description grrDescription application name "Facebookstatus" end tell end growlNotify end using terms from ----------------------------------
This paste will be private.
From the Design Piracy series on my blog: