text
stringlengths
0
15.7k
source
stringlengths
6
112
set theRow to {}
Append to sheet.applescript
set end of theRow to newRow
Append to sheet.applescript
set end of theCells to theRow
Append to sheet.applescript
set cells of currentSheet to theCells
Append to sheet.applescript
if _files is {} then return
Group Selected Files.applescript
set _new to container of first item in _files
Group Selected Files.applescript
set _new to insertion location
Group Selected Files.applescript
set _folder to make new folder at _new
Group Selected Files.applescript
move _files to _folder
Group Selected Files.applescript
select _folder
Group Selected Files.applescript
short user name of (system info)
get-username.applescript
if the class of item 1 of these_items is album then error "You have selected an album."
iPhoto - Show selected file.applescript
if these_items = {} then error "You have not selected any photos."
iPhoto - Show selected file.applescript
set thePhoto to item 1 of these_items
iPhoto - Show selected file.applescript
set t to original path of thePhoto
iPhoto - Show selected file.applescript
set f to POSIX file t as alias
iPhoto - Show selected file.applescript
select f
iPhoto - Show selected file.applescript
display alert "Error" message errMsg
iPhoto - Show selected file.applescript
display dialog "err" with icon stop
test copy 9.applescript
generateAsciiString()
generateAsciiString.applescript
on generateAsciiString()
generateAsciiString.applescript
repeat with i from 33 to 255
generateAsciiString.applescript
set buffer to buffer & (ASCII character i)
generateAsciiString.applescript
end generateAsciiString
generateAsciiString.applescript
fmGUI_ManageDb_GoToTab({tabName:"Fields"})
fmGUI_ManageDb_GoToTab_Fields.applescript
openMarkdownNote()
Add to Bucket.applescript
on openMarkdownNote()
Add to Bucket.applescript
set theTitle to name of front document as string
Add to Bucket.applescript
set theInput to theTitle & "
Add to Bucket.applescript
tell application "Shortcuts Events" to run the shortcut named "Add to Bucket" with input theInput
Add to Bucket.applescript
end openMarkdownNote
Add to Bucket.applescript
path to public folder
path to public folder.applescript
global km, textUtil
dec-spot-stream-deck.applescript
script BaseScript
dec-spot-stream-deck.applescript
on setSessionCaseId(newCaseId)
dec-spot-stream-deck.applescript
logger's debugf("New Case ID: {}", newCaseId)
dec-spot-stream-deck.applescript
end setSessionCaseId
dec-spot-stream-deck.applescript
set sut to decorate(BaseScript)
dec-spot-stream-deck.applescript
sut's setSessionCaseId(99)
dec-spot-stream-deck.applescript
on decorate(BaseScript)
dec-spot-stream-deck.applescript
script SpotTestStreamDeckInstance
dec-spot-stream-deck.applescript
property parent : BaseScript
dec-spot-stream-deck.applescript
continue setSessionCaseId(newCaseId)
dec-spot-stream-deck.applescript
if std's appExists("Stream Deck") is false then return
dec-spot-stream-deck.applescript
km's setVariable("km_spotName", textUtil's replace(newCaseId, "-spotCheck", "-$"))
dec-spot-stream-deck.applescript
km's runScript("Script Editor: Update Stream Deck Case Desc")
dec-spot-stream-deck.applescript
continue setSessionCaseIndex(newCaseIndex)
dec-spot-stream-deck.applescript
km's setVariable("km_caseIndex", newCaseIndex)
dec-spot-stream-deck.applescript
km's runScript("Script Editor: Update Stream Deck Case Index")
dec-spot-stream-deck.applescript
set logger to std's import("logger")'s new("doc-spot-stream-deck")
dec-spot-stream-deck.applescript
if std's appExists("Stream Deck") then
dec-spot-stream-deck.applescript
set km to std's import("keyboard-maestro")'s new()
dec-spot-stream-deck.applescript
global std, speech, listUtil
dialog.applescript
set thisCaseId to "dialog-spotCheck"
dialog.applescript
Show 2 Choices
dialog.applescript
Manual: Show 2 Choices with Timeout (Timeout/Non-Timeout)
dialog.applescript
Manual: Show Warning with Timeout
dialog.applescript
Manual: Confirm Warning
dialog.applescript
Manual: Show 3 Choices
dialog.applescript
Manual: Confirm with Timeout (Yes, No, Timeout)
dialog.applescript
Manual: Show 2 Choices with default
dialog.applescript
Manual: Show choices from a list (Options: missing value, empty, happy, mismatch-default)
dialog.applescript
logger's infof("You chose: {}", sut's showChoices("Multiple Choices", "Pick which?", {"Me", "You"}))
dialog.applescript
logger's infof("You chose: {}", sut's showChoicesWithTimeout("Multiple Choices", "Pick which?", {"Me", "You"}, "Me", 5))
dialog.applescript
set speechOn of sut to true
dialog.applescript
sut's showWarningWithTimeout("Test recommended", "Test Subject changed, re-run test", 5)
dialog.applescript
log sut's confirmWarning("Spot Check Title", "Spot Check Description")
dialog.applescript
log sut's showChoices("Multiple Choices", "Pick which?", {"Client ID", "Phone ID", "Cancel"})
dialog.applescript
logger's infof("Result: {}", sut's confirmWarningWithTimeout("Auto Join is off", "Join?", 8))
dialog.applescript
logger's infof("Result: {}", sut's showChoicesWithDefault("Choices with default", "Choose", {"Yes", "No"}, "No"))
dialog.applescript
set optionsList to {"Option 1", "Option 2", "Option 3"}
dialog.applescript
logger's infof("Result: {}", sut's showChoicesFromList("Options from list", "Choose", missing value, missing value))
dialog.applescript
ut's fail("Expected error was not encountered")
dialog.applescript
if errorMessage starts with "Assertion" then
dialog.applescript
logger's infof("Result: {}", sut's showChoicesFromList("Options from list", "Choose", {}, missing value))
dialog.applescript
logger's infof("Result: {}", sut's showChoicesFromList("Options from list", "Choose", optionsList, "Option 2"))
dialog.applescript
script DialogInstance
dialog.applescript
property speechOn : false
dialog.applescript
on showChoicesFromList(title, message, optionsList, defaultChoice)
dialog.applescript
assertThat of std given condition:optionsList is not missing value, messageOnFail:"optionsList must be a valid list " & optionsList
dialog.applescript
if defaultChoice is missing value or listUtil's listContains(optionsList, defaultChoice) is false then
dialog.applescript
set chosenOption to choose from list optionsList with prompt "Please choose an option:" without multiple selections allowed and empty selection allowed
dialog.applescript
set chosenOption to choose from list optionsList with prompt "Please choose an option:" default items defaultChoice without multiple selections allowed and empty selection allowed
dialog.applescript
if chosenOption is false then return missing value
dialog.applescript
item 1 of chosenOption
dialog.applescript
end showChoicesFromList
dialog.applescript
on showOkDialog(theTitle, message)
dialog.applescript
if speech is true then
dialog.applescript
set synchronous of speech to false
dialog.applescript
tell speech to speakAndLog(message)
dialog.applescript
display dialog message with title theTitle with icon 1 buttons {"OK"}
dialog.applescript
end showOkDialog
dialog.applescript
on showWarningWithTimeout(theTitle, message, timeoutSec)
dialog.applescript
set titleWithTimeout to format {"{} (autoclose in {}s)", {theTitle, timeoutSec}}
dialog.applescript
display dialog message with title titleWithTimeout with icon 2 buttons {"OK"} giving up after timeoutSec
dialog.applescript
end showWarningWithTimeout
dialog.applescript
on showChoices(theTitle, message, choices as list)
dialog.applescript
if (count of choices) is greater than 3 then tell me to error "You can only have up to 3 choices"
dialog.applescript
display dialog message with title theTitle with icon 1 buttons choices
dialog.applescript
button returned of result
dialog.applescript