text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
on clean_number(phone_number) | PhoneNumberCleaning.scpt |
set cleaned_number to {} | PhoneNumberCleaning.scpt |
repeat with c in the characters of phone_number | PhoneNumberCleaning.scpt |
set c to c as number | PhoneNumberCleaning.scpt |
set the end of cleaned_number to c | PhoneNumberCleaning.scpt |
return join_list_by(cleaned_number, "") | PhoneNumberCleaning.scpt |
end clean_number | PhoneNumberCleaning.scpt |
on format_number(cleaned_phone_number) | PhoneNumberCleaning.scpt |
set cleaned_number to the characters of cleaned_phone_number | PhoneNumberCleaning.scpt |
"(" & text 1 thru 3 of cleaned_number & ¬ | PhoneNumberCleaning.scpt |
") " & text 4 thru 6 of cleaned_number ¬ | PhoneNumberCleaning.scpt |
& ¬ | PhoneNumberCleaning.scpt |
"-" & text 7 thru 10 of cleaned_number | PhoneNumberCleaning.scpt |
end format_number | PhoneNumberCleaning.scpt |
on join_list_by(the_list, delimiter) | PhoneNumberCleaning.scpt |
set backup_delimiter to AppleScript's text item delimiters | PhoneNumberCleaning.scpt |
set return_string to the_list as string | PhoneNumberCleaning.scpt |
set AppleScript's text item delimiters to backup_delimiter | PhoneNumberCleaning.scpt |
return return_string | PhoneNumberCleaning.scpt |
end join_list_by | PhoneNumberCleaning.scpt |
set wifiStatus to do shell script "networksetup -getairportpower en0" | Wi-FiToggle.scpt |
if wifiStatus is equal to "Wi-Fi Power (en0): On" then | Wi-FiToggle.scpt |
log "Hello" | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
on upper(texttochange) | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
return texttochange | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set finderfiles to {} | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set passes to 0 | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set misses to 0 | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set missedfiles to {} | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set selectedfiles to selection | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
log "Finder files" | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
repeat with itemref in selectedfiles | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set thename to name of itemref as text | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set thename to my upper(thename) | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
if thename contains "." then | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set {displayName, nameExt} to {text 1 thru text item -2, text item -1} of thename | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set end of finderfiles to displayName | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set end of finderfiles to thename | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
log (count of finderfiles) & " finder files selected" | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set selectedphotos to the selection | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
log "Photos files" | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
repeat with k from 1 to count of selectedphotos | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set thephoto to item k of selectedphotos | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set thefilename to thephoto's filename as text | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
if thefilename contains "." then | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set {displayName, nameExt} to {text 1 thru text item -2, text item -1} of thefilename | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set thedisplayname to displayName | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set {displayName, nameExt} to {thefilename, ""} | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set thedisplayname to thefilename | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set missed to true | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set newfinderfiles to finderfiles | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
repeat with i from 1 to count finderfiles | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
if thedisplayname contains item i of finderfiles then | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
log k & "/" & (count selectedphotos & " PASS: " & thedisplayname) | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set passes to passes + 1 | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set missed to false | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set thephoto's keywords to "NYCVAL" | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set newfinderfiles to {} | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
repeat with j from 1 to count finderfiles | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
if {finderfiles's item j} is not in {thedisplayname} then | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set newfinderfiles's end to finderfiles's item j | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set finderfiles to newfinderfiles | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
if missed is true then | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set end of missedfiles to thedisplayname | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set misses to misses + 1 | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
log "Passes: " & passes | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
log "Misses: " & misses | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
log "Missed files: " & finderfiles | Add%20tag%20to%20files%20selected%20in%20Finder.applescript |
set isChecked to value of attribute "AXMenuItemMarkChar" of menu item "High Contrast" of menu 1 of menu bar item "Preview" of menu bar 1 is not missing value | marked.applescript |
if value of attribute "AXMenuItemMarkChar" of menu item "High Contrast" of menu 1 of menu bar item "Preview" of menu bar 1 is missing value then return | marked.applescript |
click menu item "High Contrast" of menu 1 of menu bar item "Preview" of menu bar 1 | marked.applescript |
set toggle to item 1 of argv | outlook_desktop.scpt |
if toggle is "all" then | outlook_desktop.scpt |
set menuval to "All Desktops" | outlook_desktop.scpt |
set menuval to "This Desktop" | outlook_desktop.scpt |
tell application "System Events" to tell UI element "Microsoft Outlook" of list 1 of process "Dock" | outlook_desktop.scpt |
if not (exists) then return | outlook_desktop.scpt |
click menu item menuval of menu 1 of menu item "Options" of menu 1 | outlook_desktop.scpt |
repeat with aGroup in toolbarGroups | PiP Safari v2.applescript |
if (count of buttons of aGroup) is equal to 4 then -- only the URL bar has 4 buttons when playing | PiP Safari v2.applescript |
tell aGroup | PiP Safari v2.applescript |
perform action "AXShowMenu" of button 3 | PiP Safari v2.applescript |
click menu item "Enter Picture in Picture" of menu 1 | PiP Safari v2.applescript |
click menu item "Exit Picture in Picture" of menu 1 | PiP Safari v2.applescript |
else if (count of buttons of aGroup) is equal to 3 then -- URL bar has 3 buttons when not playing | PiP Safari v2.applescript |
key code 49 --space to play video to show butto n | PiP Safari v2.applescript |
return "error" | PiP Safari v2.applescript |
set newWindow to make new Finder window | New Finder Window.applescript |
set acitekey to the text returned of (display dialog "What is your citekey?" default answer "") | changeCiteKey.scpt |
set p to selected publications of front library window | changeCiteKey.scpt |
set citekey of first item of p to acitekey | changeCiteKey.scpt |
set allPubs to publication items | changeCiteKey.scpt |
repeat with aPub in allPubs | changeCiteKey.scpt |
set aucitekey to universal citekey of aPub | changeCiteKey.scpt |
set theTextItems to text items of aucitekey | changeCiteKey.scpt |
set aucitekey to theTextItems as string | changeCiteKey.scpt |
set citekey of aPub to aucitekey | changeCiteKey.scpt |
set atitle to title of aPub | changeCiteKey.scpt |
set c to words 1 thru 2 of atitle as string | changeCiteKey.scpt |
set acitekey to ((text 1 thru -3 of aucitekey) & c) | changeCiteKey.scpt |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.