text
stringlengths
0
15.7k
source
stringlengths
6
112
end index_of
ListParser.applescript
on indices(the_list, the_items)
ListParser.applescript
set the_indices to {}
ListParser.applescript
repeat with i from 1 to (length of the_items)
ListParser.applescript
set the_item to item i of the_items
ListParser.applescript
set the_indices to the_indices & index_of(the_list, the_item)
ListParser.applescript
return the_indices
ListParser.applescript
end indices
ListParser.applescript
on clone(the_list)
ListParser.applescript
return every item of the_list
ListParser.applescript
on items_at(the_list, indices)
ListParser.applescript
set the_items to {}
ListParser.applescript
repeat with i from 1 to (length of indices)
ListParser.applescript
set the_index to item i of indices
ListParser.applescript
set the_items to the_items & (item the_index of the_list)
ListParser.applescript
return the_items
ListParser.applescript
end items_at
ListParser.applescript
on occurences(theList, theItem)
ListParser.applescript
repeat with i from 1 to count of theList
ListParser.applescript
if item i of theList is equal to theItem then
ListParser.applescript
end occurences
ListParser.applescript
SFR_DictGet("<:foo:=bar:><:fizz:=buzz:>", "foo")
SFR_DictGet.applescript
on SFR_DictGet(someDict, itemName)
SFR_DictGet.applescript
set keyString to "<:" & SFR_Escape(itemName) & ":="
SFR_DictGet.applescript
set endString to ":>"
SFR_DictGet.applescript
if someDict does not contain keyString then
SFR_DictGet.applescript
set AppleScript's text item delimiters to the keyString
SFR_DictGet.applescript
set the keyRemoved to text item 2 of someDict
SFR_DictGet.applescript
if keyRemoved does not contain endString then
SFR_DictGet.applescript
set AppleScript's text item delimiters to endString
SFR_DictGet.applescript
set the itemValue to text item 1 of keyRemoved
SFR_DictGet.applescript
return SFR_Unescape(itemValue)
SFR_DictGet.applescript
end SFR_DictGet
SFR_DictGet.applescript
on SFR_Escape(someString)
SFR_DictGet.applescript
tell application "htcLib" to SFR_Escape(someString)
SFR_DictGet.applescript
end SFR_Escape
SFR_DictGet.applescript
on SFR_Unescape(someString)
SFR_DictGet.applescript
tell application "htcLib" to SFR_Unescape(someString)
SFR_DictGet.applescript
end SFR_Unescape
SFR_DictGet.applescript
set thePropList to get properties of this_item
CloseGetInfoFinderWindows.applescript
set CurrentView to current panel of thePropList
CloseGetInfoFinderWindows.applescript
log "Not an info panel, leaving open: " & windowName
CloseGetInfoFinderWindows.applescript
set CurrentView to current view of thePropList
CloseGetInfoFinderWindows.applescript
if shouldClose = false then log "Not an info panel: " & windowName
CloseGetInfoFinderWindows.applescript
if windowName ends with " Info" and shouldClose then
CloseGetInfoFinderWindows.applescript
close this_item
CloseGetInfoFinderWindows.applescript
log "Closing info panel: " & windowName
CloseGetInfoFinderWindows.applescript
set thePageCount to 0
Page count of selected PDF documents.applescript
set thePageCount to thePageCount + (page count of theRecord)
Page count of selected PDF documents.applescript
if thePageCount is 0 then error "Please select some PDF documents."
Page count of selected PDF documents.applescript
set theMessage to (thePageCount as string) & " pages."
Page count of selected PDF documents.applescript
display alert "DEVONthink" message theMessage as informational
Page count of selected PDF documents.applescript
set the sourceString to current application's NSString's stringWithString:inString
Transform-Text.applescript
global debug_level
send_key_codes.scpt
global delay_float
send_key_codes.scpt
global appref
send_key_codes.scpt
global callappref
send_key_codes.scpt
global keycode
send_key_codes.scpt
global my_using
send_key_codes.scpt
set keycode to 40
send_key_codes.scpt
set test to 0
send_key_codes.scpt
set delay_float to 0.5
send_key_codes.scpt
set debug_level to 10
send_key_codes.scpt
set my_app_str to "Terminal"
send_key_codes.scpt
set appref to application my_app_str
send_key_codes.scpt
set callappref to application "System Events"
send_key_codes.scpt
send_keycodes({keycode, keycode, keycode, keycode, keycode}, appref, delay_float)
send_key_codes.scpt
send_key_code(40, appref, {command down})
send_key_codes.scpt
on send_key_code(keycode, appref, my_using)
send_key_codes.scpt
if the debug_level > 9 then tell appref to activate
send_key_codes.scpt
if the debug_level > 3 then delay delay_float
send_key_codes.scpt
key code keycode using my_using
send_key_codes.scpt
end send_key_code
send_key_codes.scpt
on send_keystroke(stroke_string, appref, my_using)
send_key_codes.scpt
keystroke stroke_string using my_using
send_key_codes.scpt
end send_keystroke
send_key_codes.scpt
on send_keycodes(keycodes, appref, delay_float)
send_key_codes.scpt
repeat with keycode in keycodes
send_key_codes.scpt
send_key_code(keycode, appref, {})
send_key_codes.scpt
end send_keycodes
send_key_codes.scpt
do shell script "~/.bin/z_add " & the quoted form of theFolderPath
Add File Paths to z.applescript
set termCommands to {¬ {command:"workon simpleloop"}, ¬
quicklaunch.applescript
{command:"workon simpleloop && gulp serve"}, ¬
quicklaunch.applescript
{splits:{¬ {command:"postgres -D /usr/local/var/postgres", splitType:"v"}, ¬
quicklaunch.applescript
{command:"redis-server /usr/local/etc/redis.conf", splitType:"v"}, ¬
quicklaunch.applescript
{command:"rabbitmq-server", splitType:"h"} ¬
quicklaunch.applescript
} ¬
quicklaunch.applescript
on splitOrRun(aSession, commandRecord)
quicklaunch.applescript
set shellCmd to (command of (commandRecord & ({command:""})))
quicklaunch.applescript
set splitsCmds to (splits of (commandRecord & ({splits:{}})))
quicklaunch.applescript
if shellCmd is not "" then
quicklaunch.applescript
tell aSession
quicklaunch.applescript
write text shellCmd
quicklaunch.applescript
else if splitsCmds is not {} then
quicklaunch.applescript
repeat with j from 1 to count of splitsCmds
quicklaunch.applescript
set splitRecord to item j of splitsCmds
quicklaunch.applescript
set splitType to (splitType of (splitRecord & ({splitType:""})))
quicklaunch.applescript
set splitCmd to (command of (splitRecord & ({command:""})))
quicklaunch.applescript
write text splitCmd
quicklaunch.applescript
if splitType = "v" then
quicklaunch.applescript