text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
do shell script "afplay /System/Library/Sounds/Funk.aiff" | VoiceOverTranslator.applescript |
return "%error%" | VoiceOverTranslator.applescript |
end getTranslatedText | VoiceOverTranslator.applescript |
on getSourceText() | VoiceOverTranslator.applescript |
set result to replaceChars(getSpokenTextByVoiceOver(), "'", "\\'") | VoiceOverTranslator.applescript |
set result to replaceChars(result, "\"", "\\\"") | VoiceOverTranslator.applescript |
set result to replaceChars(result, " | VoiceOverTranslator.applescript |
end getSourceText | VoiceOverTranslator.applescript |
set q to q as text | gistfile1-2 copy 2.scpt |
if (q is equal to "") then | gistfile1-2 copy 2.scpt |
log "no parameter" | gistfile1-2 copy 2.scpt |
set alfredInput to "Other" | gistfile1-2 copy 2.scpt |
set q to "Other" | gistfile1-2 copy 2.scpt |
log q | gistfile1-2 copy 2.scpt |
set alfredInput to q | gistfile1-2 copy 2.scpt |
using terms from application "Sparrow" | gistfile1-2 copy 2.scpt |
set theMessage to make new outgoing message with properties {subject:"CANNED EMAIL SUBJECT - PARAMETER: " & alfredInput, content:"All
This is a canned e-mail being generated by Alfred using an AppleScript Extension. If it contains a parameter, it will be listed below and in the subject.
PARAMETER: " & alfredInput & "
Details (optional): ", message signature:"YOUR SIGNATURE"} | gistfile1-2 copy 2.scpt |
make new to recipient at end of to recipients with properties {name:"RECIPIENT NAME", address:"[email protected]"} | gistfile1-2 copy 2.scpt |
on splitPath(theFilePath) | SplitPath.applescript |
set theList to {thePath:"", theFile:"", theName:"", theExtension:""} | SplitPath.applescript |
set thePath of theList to (text items 1 thru -2 of theFilePath) | SplitPath.applescript |
set theFile of theList to (last text item of theFilePath) | SplitPath.applescript |
set temp to last text item of theFilePath | SplitPath.applescript |
set theName of theList to (text item 1 of temp as text) | SplitPath.applescript |
set theExtension of theList to (text item 2 of temp as text) | SplitPath.applescript |
on theSplit(theString, theDelimiter, theExportText) | bookends_to_bibtex.scpt |
set currentDelimiters to AppleScript's text item delimiters | bookends_to_bibtex.scpt |
set theGroupArray to every text item of theString | bookends_to_bibtex.scpt |
set AppleScript's text item delimiters to currentDelimiters | bookends_to_bibtex.scpt |
set theSelectedList to {} | bookends_to_bibtex.scpt |
repeat with myGroup in theGroupArray | bookends_to_bibtex.scpt |
if ((myGroup as string) contains theExportText) then | bookends_to_bibtex.scpt |
set thecommandstring to "echo \"" & myGroup & "\"| sed \"s/.*\\/\\(.*\\)/\\1/\"" as string | bookends_to_bibtex.scpt |
set end of theSelectedList to sedResult | bookends_to_bibtex.scpt |
return theSelectedList | bookends_to_bibtex.scpt |
set DEBUG to false | bookends_to_bibtex.scpt |
if argv contains "DEBUG" then | bookends_to_bibtex.scpt |
set DEBUG to true | bookends_to_bibtex.scpt |
if (count of argv) > 1 then | bookends_to_bibtex.scpt |
set myGroupsToExport to item 1 of argv | bookends_to_bibtex.scpt |
set myPath to item 2 of argv | bookends_to_bibtex.scpt |
else if ((count of argv) > 0 and (count of argv) < 2) then | bookends_to_bibtex.scpt |
set myPath to POSIX path of (container of (path to me) as text) | bookends_to_bibtex.scpt |
set myGroupsToExport to "Manuscripts/" | bookends_to_bibtex.scpt |
set allGroups to «event ToySRGPN» given «class PATH»:"true" | bookends_to_bibtex.scpt |
set myGroupArray to my theSplit(allGroups, return, myGroupsToExport) | bookends_to_bibtex.scpt |
set output to ("Pattern for groups to export: " & myGroupsToExport & " | bookends_to_bibtex.scpt |
" & "Path to export to: " & myPath & " | bookends_to_bibtex.scpt |
" & "Groups exported: " & myGroupArray as string) | bookends_to_bibtex.scpt |
set AppleScript's text item delimiters to oldDelimiters -- change back to default | bookends_to_bibtex.scpt |
repeat with myGroup in myGroupArray | bookends_to_bibtex.scpt |
set thisFile to (myPath & (myGroup as string) & ".bib") as POSIX file | bookends_to_bibtex.scpt |
set quotedName to quoted form of POSIX path of thisFile | bookends_to_bibtex.scpt |
if exists thisFile then | bookends_to_bibtex.scpt |
delete thisFile --we have to delete the file first, as open for access does not! | bookends_to_bibtex.scpt |
set myFile to open for access thisFile with write permission | bookends_to_bibtex.scpt |
set myListString to «event ToySRUID» myGroup as string | bookends_to_bibtex.scpt |
set myList to text items of myListString | bookends_to_bibtex.scpt |
set steps to 25 | bookends_to_bibtex.scpt |
set listLength to length of myList | bookends_to_bibtex.scpt |
set nLoop to round (listLength / steps) rounding up | bookends_to_bibtex.scpt |
set thisLoop to 1 | bookends_to_bibtex.scpt |
repeat while thisLoop is less than or equal to nLoop | bookends_to_bibtex.scpt |
set startindex to (steps * thisLoop) - (steps - 1) | bookends_to_bibtex.scpt |
set endindex to (steps * thisLoop) | bookends_to_bibtex.scpt |
if endindex is greater than listLength then | bookends_to_bibtex.scpt |
set endindex to listLength | bookends_to_bibtex.scpt |
set thisListItems to items startindex thru endindex of myList | bookends_to_bibtex.scpt |
set thisList to thisListItems as string | bookends_to_bibtex.scpt |
set myBibTex to «event ToySGUID» thisList given «class RRTF»:"false", string:"bibtex" | bookends_to_bibtex.scpt |
write myBibTex to myFile as «class utf8» | bookends_to_bibtex.scpt |
set thisLoop to thisLoop + 1 | bookends_to_bibtex.scpt |
set fixCase to ("fixCase.rb " & quotedName) | bookends_to_bibtex.scpt |
set ssout to do shell script fixCase | bookends_to_bibtex.scpt |
\" > temp.bib; mv temp.bib \"" & (myGroup as string) & ".bib\"" as string) | bookends_to_bibtex.scpt |
return output & "\n" & ssout & "\n\nBookends BiBTeX export took " & diffT & " seconds in total" | bookends_to_bibtex.scpt |
set pathB to POSIX path of (path to home folder as text) & "notes" | safaritaculous.scpt |
set theDate to do shell script "date +%Y_%m_%d__%H_%M_%Surl" | safaritaculous.scpt |
property report_Title : "URL List from Safari dateVar" | safaritaculous.scpt |
log date_stamp | safaritaculous.scpt |
set filesavepath to POSIX path of "notes/" | safaritaculous.scpt |
set save_File to choose file name with prompt "Name this file:" default name theDate default location (pathB as POSIX file) | safaritaculous.scpt |
say "You are not listening to me!" using "Bubbles" | safaritaculous.scpt |
set inboxItems to every record of the inbox | DT_set_labels.scpt |
repeat with inboxItem in inboxItems | DT_set_labels.scpt |
set the label of inboxItem to 1 | DT_set_labels.scpt |
repeat with doc in input | workflow.scpt |
set fname to name of (info for doc) | workflow.scpt |
set thePath to (container of doc) as alias as text | workflow.scpt |
set newFile to (thePath & fname & ".pdf") | workflow.scpt |
set thisDoc to front document | workflow.scpt |
save thisDoc as "SLDocumentTypePDF" in newFile | workflow.scpt |
close thisDoc saving no | workflow.scpt |
display dialog "Some problem occurred. | workflow.scpt |
File " & fname & " | workflow.scpt |
could not be saved as PDF." | workflow.scpt |
set userColor to "green" -- the colour of the resulting recall cue | Create GLDSQ scene recall with name.applescript |
set bankNumHex to calculateBank(sceneNumber) | Create GLDSQ scene recall with name.applescript |
set sceneNumHex to calculateScene(sceneNumber) | Create GLDSQ scene recall with name.applescript |
set sceneGroup to first item of (selected as list) | Create GLDSQ scene recall with name.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.