text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
get top level script collection
|
export fastscript shortcuts.scpt
|
get name of every recently run script item
|
export fastscript shortcuts.scpt
|
get (keyboard shortcut of script item 1 is missing value)
|
export fastscript shortcuts.scpt
|
properties of script item 1
|
export fastscript shortcuts.scpt
|
set theShortcutsList to "name, shortcut, script_file"
|
export fastscript shortcuts.scpt
|
set theShortcutsCount to 0
|
export fastscript shortcuts.scpt
|
repeat with theItem in (every script item)
|
export fastscript shortcuts.scpt
|
if keyboard shortcut of theItem is not missing value then
|
export fastscript shortcuts.scpt
|
log (get name of theItem)
|
export fastscript shortcuts.scpt
|
log (get keyboard shortcut of theItem)
|
export fastscript shortcuts.scpt
|
log (get script file of theItem)
|
export fastscript shortcuts.scpt
|
set itemProps to "\"" & (name of theItem) & "\", \"" & (shortcut string of keyboard shortcut of theItem) & "\", " & (script file of theItem)
|
export fastscript shortcuts.scpt
|
set theShortcutsList to theShortcutsList & return & itemProps
|
export fastscript shortcuts.scpt
|
set theShortcutsCount to theShortcutsCount + 1
|
export fastscript shortcuts.scpt
|
log theShortcutsCount -- 41
|
export fastscript shortcuts.scpt
|
set the clipboard to theShortcutsList
|
export fastscript shortcuts.scpt
|
theShortcutsList
|
export fastscript shortcuts.scpt
|
if class of item 1 of sel is macro and (count of items of sel) > 1 then
|
Copy-Front-Macros-AppleScript-Trigger.applescript
|
display alert "Error" message "Multiple Macros Selected" as critical buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel"
|
Copy-Front-Macros-AppleScript-Trigger.applescript
|
set uid to id of first macro whose selected is true
|
Copy-Front-Macros-AppleScript-Trigger.applescript
|
set the clipboard to ¬
|
Copy-Front-Macros-AppleScript-Trigger.applescript
|
"-- ignoring application responses
|
Copy-Front-Macros-AppleScript-Trigger.applescript
|
tell application \"Keyboard Maestro Engine\"
|
Copy-Front-Macros-AppleScript-Trigger.applescript
|
do script \"" & uid & "\"
|
Copy-Front-Macros-AppleScript-Trigger.applescript
|
tell application "Messages" to activate
|
setup_ichat_trigger.applescript
|
tell process "iChat"
|
setup_ichat_trigger.applescript
|
keystroke "," using command down
|
setup_ichat_trigger.applescript
|
click button "Alerts" of tool bar 1 of window 1
|
setup_ichat_trigger.applescript
|
tell group 1 of group 1 of window 1
|
setup_ichat_trigger.applescript
|
click pop up button 2
|
setup_ichat_trigger.applescript
|
click menu item "Invitation to Share My Screen" of menu 1 of pop up button 2
|
setup_ichat_trigger.applescript
|
set applescript_box to checkbox "Run an AppleScript script:"
|
setup_ichat_trigger.applescript
|
if not value of applescript_box as boolean then
|
setup_ichat_trigger.applescript
|
click applescript_box
|
setup_ichat_trigger.applescript
|
set script_menu to pop up button 3
|
setup_ichat_trigger.applescript
|
click script_menu
|
setup_ichat_trigger.applescript
|
click menu item "AutoAccept.scpt" of menu 1 of script_menu
|
setup_ichat_trigger.applescript
|
tell application "Messages" to quit
|
setup_ichat_trigger.applescript
|
make new list with properties {name:"test"}
|
test copy 10.applescript
|
make new list with properties {name:"test2"}
|
test copy 10.applescript
|
make new list with properties {name:"tes3"}
|
test copy 10.applescript
|
make new list with properties {name:"test4"}
|
test copy 10.applescript
|
make new list with properties {name:"test5"}
|
test copy 10.applescript
|
make new list with properties {name:"test6"}
|
test copy 10.applescript
|
make new list with properties {name:"test7"}
|
test copy 10.applescript
|
make new list with properties {name:"test8"}
|
test copy 10.applescript
|
make new list with properties {name:"test9"}
|
test copy 10.applescript
|
make new list with properties {name:"test10"}
|
test copy 10.applescript
|
repeat with l in every list
|
test copy 10.applescript
|
set _id to (id of l)
|
test copy 10.applescript
|
delete list id _id
|
test copy 10.applescript
|
set phrase to input as string
|
lookup.scpt
|
set ui_lang to "en"
|
lookup.scpt
|
set from_lang to "auto"
|
lookup.scpt
|
set to_lang to "zh-CN"
|
lookup.scpt
|
set google_translate_url to "https://translate.google.com"
|
lookup.scpt
|
set google_translate_look_up_url to google_translate_url & "/?hl=" & ui_lang & "&sl=" & from_lang & "&tl=" & to_lang & "&text=" & phrase
|
lookup.scpt
|
repeat with chrome_window in windows
|
lookup.scpt
|
repeat with t in tabs of chrome_window
|
lookup.scpt
|
if URL of t starts with google_translate_url then
|
lookup.scpt
|
set URL of t to google_translate_look_up_url
|
lookup.scpt
|
open location google_translate_look_up_url
|
lookup.scpt
|
set thePatterns to "(r\\s*\\d\\s*\\d\\s*[-\\s]*\\d\\s*\\d\\s*\\d\\s*\\d\\s*\\d)"
|
regex_with_objcbridge.applescript
|
set theStrings to "R17-11517 r17-11518 r17-11519 R17-11518 R17-11519"
|
regex_with_objcbridge.applescript
|
repeat 7 times
|
regex_with_objcbridge.applescript
|
set thePatterns to thePatterns & return & thePatterns
|
regex_with_objcbridge.applescript
|
set theStrings to theStrings & return & theStrings
|
regex_with_objcbridge.applescript
|
set startDate to current date
|
regex_with_objcbridge.applescript
|
set theResult to matchesForPatternsAndStrings(thePatterns, theStrings)
|
regex_with_objcbridge.applescript
|
log "Duration: " & ((current date) - startDate) & "s"
|
regex_with_objcbridge.applescript
|
log "Processed " & (count of paragraphs of thePatterns) * (count of paragraphs of theStrings) & " regular expressions"
|
regex_with_objcbridge.applescript
|
log "Result length: " & length of theResult & " characters"
|
regex_with_objcbridge.applescript
|
on matchesForPatternsAndStrings(thePatterns, theStrings)
|
regex_with_objcbridge.applescript
|
set thePatterns to str(thePatterns)
|
regex_with_objcbridge.applescript
|
set theStrings to str(theStrings)
|
regex_with_objcbridge.applescript
|
set thePatterns to thePatterns's componentsSeparatedByString:return
|
regex_with_objcbridge.applescript
|
set theStrings to theStrings's componentsSeparatedByString:return
|
regex_with_objcbridge.applescript
|
set allMatches to current application's NSMutableArray's array
|
regex_with_objcbridge.applescript
|
repeat with i from 1 to count of theStrings
|
regex_with_objcbridge.applescript
|
set allMatchesForThisLine to current application's NSMutableArray's array
|
regex_with_objcbridge.applescript
|
repeat with j from 1 to count of thePatterns
|
regex_with_objcbridge.applescript
|
set matchesForThisPattern to matchesForPatternAndString(item j of thePatterns, item i of theStrings)
|
regex_with_objcbridge.applescript
|
(allMatchesForThisLine's addObjectsFromArray:matchesForThisPattern)
|
regex_with_objcbridge.applescript
|
(allMatches's addObject:(allMatchesForThisLine's componentsJoinedByString:"<DELIMITER>"))
|
regex_with_objcbridge.applescript
|
return (allMatches's componentsJoinedByString:return) as text
|
regex_with_objcbridge.applescript
|
end matchesForPatternsAndStrings
|
regex_with_objcbridge.applescript
|
on matchesForPatternAndString(aPattern, aString)
|
regex_with_objcbridge.applescript
|
set regEx to current application's NSRegularExpression's regularExpressionWithPattern:aPattern options:1 |error|:(null)
|
regex_with_objcbridge.applescript
|
set aRange to current application's NSMakeRange(0, aString's |length|())
|
regex_with_objcbridge.applescript
|
set allMatches to regEx's matchesInString:aString options:0 range:aRange
|
regex_with_objcbridge.applescript
|
set allMatchedStrings to current application's NSMutableArray's array
|
regex_with_objcbridge.applescript
|
repeat with i from 1 to count of allMatches
|
regex_with_objcbridge.applescript
|
(allMatchedStrings's addObject:(aString's substringWithRange:((item i of allMatches)'s rangeAtIndex:1)))
|
regex_with_objcbridge.applescript
|
return allMatchedStrings
|
regex_with_objcbridge.applescript
|
end matchesForPatternAndString
|
regex_with_objcbridge.applescript
|
on str(aString)
|
regex_with_objcbridge.applescript
|
return current application's NSString's stringWithString:aString
|
regex_with_objcbridge.applescript
|
tell application "System Events" to set listOfProcesses to (name of every process where background only is false)
|
OpenBraveIncognito.applescript
|
if "Brave Browser" is not in listOfProcesses then
|
OpenBraveIncognito.applescript
|
tell application "Brave Browser"
|
OpenBraveIncognito.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.