text
stringlengths
0
15.7k
source
stringlengths
6
112
set finalLine to last item of procItems
Save%20Files%20to%20Evernote.scpt
set AppleScript's text item delimiters to finalDelim
Save%20Files%20to%20Evernote.scpt
set finalProc to first text item of finalLine
Save%20Files%20to%20Evernote.scpt
set last item of procItems to finalProc
Save%20Files%20to%20Evernote.scpt
repeat with procItem in procItems
Save%20Files%20to%20Evernote.scpt
set the_String to procItem
Save%20Files%20to%20Evernote.scpt
if (the last character of (the_String) is ",") then
Save%20Files%20to%20Evernote.scpt
set newItem to (text 1 thru ((length of the_String) - 1)) of the_String as string
Save%20Files%20to%20Evernote.scpt
copy newItem to the end of tagItems
Save%20Files%20to%20Evernote.scpt
set newItem to (text 1 thru (length of the_String)) of the_String as string
Save%20Files%20to%20Evernote.scpt
if tagItems is null then
Save%20Files%20to%20Evernote.scpt
return tagItems
Save%20Files%20to%20Evernote.scpt
end getTags
Save%20Files%20to%20Evernote.scpt
set defer date of selectedItem to (newDate + (time of originalStartDateTime))
Defer Until Tomorrow.scpt
set defer date of selectedItem to (newDate + (startTime * hours))
Defer Until Tomorrow.scpt
set theScript to first document
Export to snippets Repo.applescript
set thePath to path of theScript
Export to snippets Repo.applescript
set scriptName to name of theScript
Export to snippets Repo.applescript
set scriptFolder to container of disk item (path of disk item thePath)
Export to snippets Repo.applescript
tell application "System Events" to set theUserLibary to library folder of user domain
Export to snippets Repo.applescript
set userLibraryPath to (path of theUserLibary as string)
Export to snippets Repo.applescript
if (path of scriptFolder) starts with userLibraryPath then
Export to snippets Repo.applescript
set repoScriptPath to (POSIX path of home folder of user domain) & "/Repos/snippets/" & (name of scriptFolder) & "/" & scriptName & ".applescript"
Export to snippets Repo.applescript
set repoScriptFile to POSIX file (POSIX path of repoScriptPath)
Export to snippets Repo.applescript
save theScript as "text" in repoScriptFile
Export to snippets Repo.applescript
display dialog ("'" & scriptName & "'" & " isn't in " & (POSIX path of userLibraryPath))
Export to snippets Repo.applescript
set deskOptions to {"Allen & Heath GLD/SQ", "Yamaha CL/QL", "Yamaha Rivage PM"}
Choose Desk to program.applescript
set deskToProgram to choose from list deskOptions with title "Choose mixing desk to program"
Choose Desk to program.applescript
setDesk(deskToProgram)
Choose Desk to program.applescript
on setDesk(desk)
Choose Desk to program.applescript
if desk is {"Allen & Heath GLD/SQ"} then
Choose Desk to program.applescript
set q_num of cue "Recall" to "ahRecall"
Choose Desk to program.applescript
set q_num of cue "Name" to "ahRecallName"
Choose Desk to program.applescript
set armed of cue "o/s" to false
Choose Desk to program.applescript
else if desk is {"Yamaha CL/QL"} then
Choose Desk to program.applescript
set q_num of cue "Recall" to "yRecall"
Choose Desk to program.applescript
set q_num of cue "Name" to "yRecallName"
Choose Desk to program.applescript
set armed of cue "o/s" to true
Choose Desk to program.applescript
else if desk is {"Yamaha Rivage PM"} then
Choose Desk to program.applescript
set q_num of cue "Recall" to "pmRecall"
Choose Desk to program.applescript
set q_num of cue "Name" to "pmRecallName"
Choose Desk to program.applescript
set armed of cue "o/s" to false -- offsetting doesn't work because the event list must be manually updated
Choose Desk to program.applescript
end setDesk
Choose Desk to program.applescript
if selection = {} then
Mail2Reminders.applescript
display dialog "mail2reminders: You should select an email" buttons {"OK"}
Mail2Reminders.applescript
set selected_mails to selection
Mail2Reminders.applescript
set selected_mail to item 1 of selected_mails
Mail2Reminders.applescript
set mail_URL to "message://%3c" & selected_mail's message id & "%3e"
Mail2Reminders.applescript
set mail_subject to selected_mail's subject
Mail2Reminders.applescript
set list_names to name of every list of application "Reminders"
Mail2Reminders.applescript
set selected_lists to (choose from list list_names)
Mail2Reminders.applescript
if (selected_lists is false) then
Mail2Reminders.applescript
set display_string to "Reminder in how many hours? (0 for no reminder)"
Mail2Reminders.applescript
set default_answer to 0
Mail2Reminders.applescript
set response to display dialog display_string default answer default_answer buttons {"OK"}
Mail2Reminders.applescript
set n_hours to (text returned of response) as number
Mail2Reminders.applescript
set display_string to errstr & return & "You have to provide a number."
Mail2Reminders.applescript
set default_answer to text returned of response
Mail2Reminders.applescript
set in_hours to (current date) + (n_hours * hours)
Mail2Reminders.applescript
set selected_list to (item 1 of selected_lists)
Mail2Reminders.applescript
tell list selected_list
Mail2Reminders.applescript
if n_hours is equal to 0 then
Mail2Reminders.applescript
make new reminder at the end of reminders with properties {name:mail_subject, body:mail_URL}
Mail2Reminders.applescript
make new reminder at the end of reminders with properties {name:mail_subject, body:mail_URL, due date:in_hours}
Mail2Reminders.applescript
display dialog "New task in " & selected_list & ". " buttons {"OK"}
Mail2Reminders.applescript
replace(" ","\\ ","/long path/to/")
on replace(tofind, toreplace, TheString).applescript
set filename to "/long path/to/difficalt() file"
on replace(tofind, toreplace, TheString).applescript
set replaces to {" ","(",")"}
on replace(tofind, toreplace, TheString).applescript
repeat with r in replaces
on replace(tofind, toreplace, TheString).applescript
set filename to replace(r,"\\"&r,filename)
on replace(tofind, toreplace, TheString).applescript
set fileName to replaceText(windowName, " — Edited", "")
openAssociatedFile.scpt
set openFileName to replaceText(fileName, "Tests.", ".")
openAssociatedFile.scpt
if fileName is equal to openFileName then
openAssociatedFile.scpt
set openFileName to replaceText(fileName, ".", "Tests.")
openAssociatedFile.scpt
keystroke "o" using {command down, shift down}
openAssociatedFile.scpt
keystroke openFileName
openAssociatedFile.scpt
keystroke return using {option down}
openAssociatedFile.scpt
on replaceText(src, tg, rp)
openAssociatedFile.scpt
set AppleScript's text item delimiters to tg
openAssociatedFile.scpt
set myList to text items of src
openAssociatedFile.scpt
set AppleScript's text item delimiters to rp
openAssociatedFile.scpt
-- List concatenation test
Script 29-2.applescript
set the_list to {}
Script 29-2.applescript
repeat with i from 1 to 10000
Script 29-2.applescript
set the_list to the_list & {i}
Script 29-2.applescript
set end of the_list to i
Script 29-2.applescript
set selectedNootbooks to choose from list notebookNames with prompt "ノートブックを選択して下さい" default items firstNotebookName -- with multiple selections allowed 複数ノートブックの選択を可能にする
gistfile1 copy 2.applescript
play aWindow
qtPlayAll.applescript
return fmGUI_ObjectClick_Button({buttonName:"Sign In"} & prefs)
fmGUI_ObjectClick_SignInButton.applescript
error "Unable to fmGUI_ObjectClick_SignInButton - " & errMsg number errNum
fmGUI_ObjectClick_SignInButton.applescript
set _Path to "/Users/YOURNAMEHERE/Documents/Scripts"
ScriptLauncher.applescript
set vURL to URL of current tab of window 1
Open%20in%20Google%20Chrome.scpt
if windows ≠ {} then
Open%20in%20Google%20Chrome.scpt
make new tab at the end of window 1 with properties {URL:vURL}
Open%20in%20Google%20Chrome.scpt
set URL of (active tab of window 1) to vURL
Open%20in%20Google%20Chrome.scpt
property parent : script "com.lifepillar/ASUnit"
Test Loader.applescript
set pwd to (the folder of file (path to me) of application "Finder")
Test Loader.applescript
set suite to makeTestLoader()'s loadTestsFromFolder(pwd)
Test Loader.applescript
set frontmostProcess to first process where it is frontmost
last_in_front.applescript
set visible of frontmostProcess to false
last_in_front.applescript