text
stringlengths
0
15.7k
source
stringlengths
6
112
set tabTitle to title of tab_item
Chrome copy 3.applescript
set note1 to first item in theNotes
get selected note of evernote.applescript
get title of note1
get selected note of evernote.applescript
to getUnsubscribeCommands(unsubscribeHeader)
Unlister.applescript
set awk to " | awk 'NR>1{print $1}' RS='<' FS='>'"
Unlister.applescript
set result to do shell script "echo " & quoted form of unsubscribeHeader & awk
Unlister.applescript
end getUnsubscribeCommands
Unlister.applescript
to parseMailtoURL(mailtoURL)
Unlister.applescript
set quot to quoted form of mailtoURL
Unlister.applescript
set egrep to " | perl -nle 'print $& if /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}/'"
Unlister.applescript
set recipient to do shell script "echo " & quot & egrep as string
Unlister.applescript
set sed1 to " | perl -nle 'print $1 if /[&\\?]subject=([^?&]+)/'"
Unlister.applescript
set subject to do shell script "echo " & quot & sed1 as string
Unlister.applescript
set sed2 to " | perl -nle 'print $1 if /[&\\?]body=([^?&]+)/'"
Unlister.applescript
set body to do shell script "echo " & quot & sed2 as string
Unlister.applescript
return {rcp:recipient, sbj:subject, bdy:body}
Unlister.applescript
end parseMailtoURL
Unlister.applescript
to unsubscribeFrom(subscription, command)
Unlister.applescript
set commandScheme to scheme of (command as URL)
Unlister.applescript
if commandScheme is mail URL then
Unlister.applescript
set newMail to my parseMailtoURL(command)
Unlister.applescript
set user to ((name of subscription's recipient) as string) & " <" & address of subscription's recipient & ">"
Unlister.applescript
if sbj of newMail is "" then set sbj of newMail to " " -- Avoid "this message has no subject" alert
Unlister.applescript
tell (make new outgoing message with properties {subject:sbj of newMail, sender:user, content:bdy of newMail})
Unlister.applescript
make new to recipient with properties {address:rcp of newMail}
Unlister.applescript
else if commandScheme is in {secure http URL, http URL} then
Unlister.applescript
do shell script "curl -LfS " & command
Unlister.applescript
log e as string
Unlister.applescript
end unsubscribeFrom
Unlister.applescript
set titles to {}
Unlister.applescript
set subscriptions to messages of junk mailbox whose all headers contains "List-Unsubscribe"
Unlister.applescript
repeat with mail in subscriptions
Unlister.applescript
set end of titles to mail's sender & ": " & mail's subject & " " & mail's id
Unlister.applescript
set choices to choose from list titles with prompt "Select subscriptions." OK button name {"Unsubscribe"} cancel button name {"Cancel"} with multiple selections allowed
Unlister.applescript
if choices is false then return
Unlister.applescript
set dialogResult to display dialog "Do you also want to trash the selected mails?" buttons {"Yes", "No"}
Unlister.applescript
set mustTrash to button returned of dialogResult is "Yes"
Unlister.applescript
set succeeded to 0
Unlister.applescript
set my progress total steps to length of choices
Unlister.applescript
set my progress completed steps to 0
Unlister.applescript
repeat with choice in choices
Unlister.applescript
set subscription to (first message of junk mailbox whose id = last word of choice)
Unlister.applescript
set unsubscribeHeader to content of subscription's header named "List-Unsubscribe"
Unlister.applescript
set commands to my getUnsubscribeCommands(unsubscribeHeader)
Unlister.applescript
repeat with command in commands
Unlister.applescript
set success to my unsubscribeFrom(subscription, command)
Unlister.applescript
set succeeded to 1 + succeeded
Unlister.applescript
if mustTrash then delete subscription
Unlister.applescript
set my progress completed steps to 1 + (my progress completed steps)
Unlister.applescript
display alert "Unsubscribed from " & succeeded & "/" & length of choices & " lists."
Unlister.applescript
set these_links to get embedded images of this_source base URL this_URL
Add Images.applescript
if the (count of these_links) is 0 then error "No images in this document"
Add Images.applescript
property appleID : "yourAppleID"
Send with Messages.applescript
property path_to_python : "/usr/bin/python"
Send with Messages.applescript
property path_to_qs_messages : "/Users/[username]/path/to/qs_messages.py"
Send with Messages.applescript
property abs_path_to_messages_phonebook : "/Users/[username]/path/to/messages_phonebook.txt"
Send with Messages.applescript
return {"qs.contact.phone", "qs.contact.email"}
Send with Messages.applescript
on process text firstPane with thirdPane
Send with Messages.applescript
if appleID is "yourAppleID" then
Send with Messages.applescript
display dialog "You need to open the \"Send with Messages\" Action script and set your Apple ID. Exiting."
Send with Messages.applescript
set the_command to path_to_python & " " & path_to_qs_messages & " " & quoted form of thirdPane & " " & quoted form of abs_path_to_messages_phonebook
Send with Messages.applescript
set thirdPane to do shell script the_command
Send with Messages.applescript
tell (first service whose (service type is iMessage and name is ("E:" & appleID)))
Send with Messages.applescript
log in
Send with Messages.applescript
send firstPane to buddy thirdPane
Send with Messages.applescript
tell application "Google Chrome Canary"
Send to Canary.applescript
set STEPSFINISHED to 3 # "config" (the only difference between trio & quad)
iTerm-trio-profile.applescript
set runCounter to get_number_variable "iTerm-profile-runCounter"
iTerm-trio-profile.applescript
if runCounter is equal to missing value then set runCounter to 1
iTerm-trio-profile.applescript
set newVal to runCounter + 1
iTerm-trio-profile.applescript
if (runCounter equals STEPSFINISHED) then set newVal to 1 # reset runCounter (finished)
iTerm-trio-profile.applescript
set_number_variable "iTerm-profile-runCounter" to newVal
iTerm-trio-profile.applescript
set kcodes to {18, 19, 20, 21} # 1 (18) 2 (19) 3 (20) 4 (21) ... 0 (29)
iTerm-trio-profile.applescript
set T to (current tab) of (current window)
iTerm-trio-profile.applescript
if (runCounter equals STEPSFINISHED) then
iTerm-trio-profile.applescript
repeat with sesh in sessions of T
iTerm-trio-profile.applescript
key code (item i) of kcodes using {option down} # opt i (go to panel i)
iTerm-trio-profile.applescript
keystroke "K" using {command down} # clear (cmd + k)
iTerm-trio-profile.applescript
tell application "System Events" to key code ((item 1) of kcodes) using {option down} # opt 1
iTerm-trio-profile.applescript
if (runCounter equals 1) then
iTerm-trio-profile.applescript
tell (current session) of T to split horizontally with same profile # right pane
iTerm-trio-profile.applescript
else if (runCounter equals 2) then
iTerm-trio-profile.applescript
tell (current session) of T to split vertically with same profile # bottom right pane
iTerm-trio-profile.applescript
return # prevent log @ top of terminal
iTerm-trio-profile.applescript
property GitUtil : my ScriptLoader's load(path to scripts folder from user domain, "git:GitUtil.applescript")
GitSync.applescript
property XMLParser : my ScriptLoader's load_script(alias ((path to scripts folder from user domain as text) & "xml:XMLParser.applescript"))
GitSync.applescript
property ShellUtil : my ScriptLoader's load_script(alias ((path to scripts folder from user domain as text) & "shell:ShellUtil.applescript"))
GitSync.applescript
property KeychainParser : my ScriptLoader's load_script(alias ((path to scripts folder from user domain as text) & "shell:KeychainParser.applescript"))
GitSync.applescript
property RegExpUtil : my ScriptLoader's load_script(alias ((path to scripts folder from user domain as text) & "regexp:RegExpUtil.applescript"))
GitSync.applescript
property current_time : 0 --keeps track of the time passed, remember to reset this value pn every init
GitSync.applescript
property the_interval : 60 --static value, increases the time by this value on every interval--TODO: rename to "frequncy" default is set to 60
GitSync.applescript
property repo_list : null --Stores all values the in repositories.xml, remember to reset this value pn every init
GitSync.applescript
property repo_file_path : ""
GitSync.applescript
property options : {"keep local version", "keep remote version", "keep mix of both versions", "open local version", "open remote version", "open mix of both versions", "keep all local versions", "keep all remote versions", "keep all local and remote versions", "open all local versions", "open all remote versions", "ope...
GitSync.applescript
set current_time to 0 --always reset this value on init, applescript has persistent values
GitSync.applescript
on initialize()
GitSync.applescript
if (FileParser's file_name(path to me) = "GitSync.applescript") then --debug mode
GitSync.applescript
set repo_file_path to FileParser's hfs_parent_path(path to me) & "repo.xml"
GitSync.applescript
log repo_file_path
GitSync.applescript
if (ShellUtil's wait_for_internet()) then handle_interval()
GitSync.applescript