text
stringlengths
0
15.7k
source
stringlengths
6
112
menu_click({"Safari", "Bookmarks", "Edit Bookmarks"})
menu_click.applescript
set r to «class ktxt» of ((the clipboard as text) as record)
Spell Clipboard Text.applescript
set todoistToken to my replace_chars(read file ((path to home folder as text) & "Library:Application Support:Microsoft:Office:Outlook Script Menu Items:todoist-token.txt"), "\n", "")
Todoist Task.applescript
display dialog "Please select a message first and then run this script." with icon 1
Todoist Task.applescript
set thePriority to priority of theMessage
Todoist Task.applescript
if thePriority is priority high then
Todoist Task.applescript
set thePriority to "4"
Todoist Task.applescript
set thePriority to "0"
Todoist Task.applescript
do shell script "curl -X POST -d 'content=" & theName & " for " & name of theSender & "' -d 'token=" & todoistToken & "' -d 'priority=" & thePriority & "' -d 'date_string=today' https://todoist.com/API/additem"
Todoist Task.applescript
set templateGroupCueName to "Crosspoints routing templates" -- group cue containing all template cues
Set crosspoints to template.applescript
set routingNumbers to {}
Set crosspoints to template.applescript
repeat with eachTemplate in routingNames
Set crosspoints to template.applescript
set eachTemplateList to util's splitString((eachTemplate as string), " - ")
Set crosspoints to template.applescript
set inputCountTemplate to item -1 of eachTemplateList as integer
Set crosspoints to template.applescript
set end of routingNumbers to inputCountTemplate
Set crosspoints to template.applescript
set inputCountCue to audio input channels of eachCue
Set crosspoints to template.applescript
set inputCountMatches to {}
Set crosspoints to template.applescript
repeat with eachTemplate from 1 to length of routingTemplates
Set crosspoints to template.applescript
if inputCountCue as integer is equal to (item eachTemplate of routingNumbers as integer) then
Set crosspoints to template.applescript
set end of inputCountMatches to eachTemplate
Set crosspoints to template.applescript
if length of inputCountMatches is 1 then
Set crosspoints to template.applescript
set whatTemplate to item (item 1 of inputCountMatches) of routingNames
Set crosspoints to template.applescript
set whatTemplateCue to (first cue in containerCue whose q name is whatTemplate)
Set crosspoints to template.applescript
set whatTemplateList to util's splitString((whatTemplate as string), " - ")
Set crosspoints to template.applescript
repeat with eachInput from 1 to inputCount
Set crosspoints to template.applescript
set eachGang to getGang eachCue row eachInput column eachChannel
Set crosspoints to template.applescript
set theLevel to getLevel whatTemplateCue row eachInput column eachChannel
Set crosspoints to template.applescript
setLevel eachCue row eachInput column eachChannel db theLevel
Set crosspoints to template.applescript
setGang eachCue row eachInput column eachChannel gang eachGang
Set crosspoints to template.applescript
set whatTemplateList to util's splitString((whatTemplate as string), " - ") -- append the cue name with " - 2" where "2" is the number of cue input channels to affect. ## Only works up to 9 ##
Set crosspoints to template.applescript
property name : "LMZRTools"
LMZRTools.scpt
to addReferenceToEvernote(theFile, theNotebook, theTags)
LMZRTools.scpt
set {noteDate, noteName, noteTags} to getReferenceDataForEvernote(theFile)
LMZRTools.scpt
set noteTags to theTags & noteTags
LMZRTools.scpt
addToEvernote(theFile, theNotebook, noteName, noteDate, noteTags)
LMZRTools.scpt
end addReferenceToEvernote
LMZRTools.scpt
to addFileToEvernote(theFile, theNotebook, theTags)
LMZRTools.scpt
set {noteDate, noteName, noteTags} to getFileDataForEvernote(theFile)
LMZRTools.scpt
end addFileToEvernote
LMZRTools.scpt
to addToEvernote(theFile, theNotebook, theName, theDate, theTags)
LMZRTools.scpt
set theNote to create note from file theFile notebook {theNotebook} title theName tags theTags created theDate
LMZRTools.scpt
set modification date of theNote to theDate
LMZRTools.scpt
end addToEvernote
LMZRTools.scpt
to getReferenceDataForEvernote(theFile)
LMZRTools.scpt
set theFileName to POSIX path of theFile
LMZRTools.scpt
set {dirname, basename} to splitFileName(theFileName)
LMZRTools.scpt
log {dirname, basename}
LMZRTools.scpt
set {noteDate, docCreator, docName} to explodeDocFileName(basename)
LMZRTools.scpt
set noteName to buildNoteTitle(docCreator, docName)
LMZRTools.scpt
set noteTags to splitString(docCreator, ", ")
LMZRTools.scpt
return {noteDate, noteName, noteTags}
LMZRTools.scpt
end getReferenceDataForEvernote
LMZRTools.scpt
to getFileDataForEvernote(theFile)
LMZRTools.scpt
tell application "Finder" to set noteDate to creation date of theFile
LMZRTools.scpt
set noteName to extractBaseFileName(basename)
LMZRTools.scpt
set noteTags to {}
LMZRTools.scpt
end getFileDataForEvernote
LMZRTools.scpt
to explodeDocFileName(fileName)
LMZRTools.scpt
set {docDateText, docCreator, docNameExt} to my splitString(fileName, " - ")
LMZRTools.scpt
set docName to my extractBaseFileName(docNameExt)
LMZRTools.scpt
set docYear to text 1 thru 4 of docDateText
LMZRTools.scpt
set docMonth to text 5 thru 6 of docDateText
LMZRTools.scpt
set docDay to text 7 thru 8 of docDateText
LMZRTools.scpt
set docMonth to docMonth + 1
LMZRTools.scpt
set docDay to "00"
LMZRTools.scpt
set docDateText to (docDay & "/" & docMonth & "/" & docYear as string)
LMZRTools.scpt
set docDate to (date docDateText)
LMZRTools.scpt
return {docDate, docCreator, docName}
LMZRTools.scpt
end explodeDocFileName
LMZRTools.scpt
to buildNoteTitle(creator, docName)
LMZRTools.scpt
return (docName & " de " & creator)
LMZRTools.scpt
end buildNoteTitle
LMZRTools.scpt
to splitFileName(thePath)
LMZRTools.scpt
set {TID, text item delimiters, i} to {text item delimiters, "/", ((thePath ends with "/") as integer) + 1}
LMZRTools.scpt
set {dirname, basename, text item delimiters} to {text 1 thru text item -(i + 1) of thePath, text item -i of thePath, TID}
LMZRTools.scpt
return {dirname, basename}
LMZRTools.scpt
to extractBaseFileName(theFileName)
LMZRTools.scpt
set theReversedFileName to (reverse of (characters of theFileName)) as string
LMZRTools.scpt
set thePrefix to (reverse of (characters (theOffset + 1) thru -1 of theReversedFileName)) as string
LMZRTools.scpt
return thePrefix
LMZRTools.scpt
end extractBaseFileName
LMZRTools.scpt
keystroke tab using (command down)
autotype.scpt
keystroke arg
autotype.scpt
key code return
autotype.scpt
set aRec to {q:"hogbehoge", n:999} -- AppleScript's Record
KeyAndValueOfAppleScriptsRecord.applescript
set aDic to current application's (NSMutableDictionary's dictionaryWithDictionary:aRec)
KeyAndValueOfAppleScriptsRecord.applescript
set aKeyList to (aDic's allKeys()) as list
KeyAndValueOfAppleScriptsRecord.applescript
set aValList to (aDic's allValues()) as list
KeyAndValueOfAppleScriptsRecord.applescript
set aVal to (aDic's valueForKey:"q") as string
KeyAndValueOfAppleScriptsRecord.applescript
set aVal to (aDic's valueForKey:"n") as integer
KeyAndValueOfAppleScriptsRecord.applescript
set thefileList to {}
convert_images_to_pdf.scpt
set new_name to "g"
convert_images_to_pdf.scpt
set testpath to POSIX path of this_file
convert_images_to_pdf.scpt
set testname to name of (info for testpath)
convert_images_to_pdf.scpt
set a_ to count testpath
convert_images_to_pdf.scpt
set b_ to count testname
convert_images_to_pdf.scpt
set minus_ to a_ - b_
convert_images_to_pdf.scpt
set oddManOut to text 1 thru (minus_) of testpath
convert_images_to_pdf.scpt
set new_name_var to testpath as string
convert_images_to_pdf.scpt
set end of thefileList to new_name_var
convert_images_to_pdf.scpt