text
stringlengths
0
15.7k
source
stringlengths
6
112
set _playList to "Today"
listened to.applescript
set _trackCount to count tracks in playlist _playList
listened to.applescript
if _trackCount is not 0 then
listened to.applescript
set _trackNames to name of tracks in playlist _playList
listened to.applescript
if _trackNames is not equal to "" then
listened to.applescript
set _trackName to SaR(_trackNames, ",", "
listened to.applescript
* ")
listened to.applescript
do shell script "echo '## iTunes activity for " & _toDaysDate & ":
listened to.applescript
* " & _trackName & "' | /usr/local/bin/dayone new"
listened to.applescript
on generateItemTextForAttachment(selectedFile)
test-selection.applescript
set resultText to "> \n"
test-selection.applescript
set currentFilename to name of selectedFile
test-selection.applescript
set resultText to resultText & currentFilename
test-selection.applescript
set resultText to resultText & ""
test-selection.applescript
end generateItemTextForAttachment
test-selection.applescript
tell front outgoing message
test-selection.applescript
set textToWrite to "Comme convenu, veuillez trouver ci-joint les documents suivants :\n"
test-selection.applescript
repeat with selectedFile in theSelection
test-selection.applescript
set textToWrite to textToWrite & generateItemTextForAttachment(selectedFile)
test-selection.applescript
set the clipboard to textToWrite
test-selection.applescript
set theList to name of every rule as list
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
bubblesort(theList)
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
copy "** New Rule ***" to the end of the theList
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
set rName to choose from list theList with prompt "Select Mail Rule" without empty selection allowed
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
set theResponse to display dialog "What's the name of the new Mail Folder? use / to create sub folders" default answer "" with icon note buttons {"Continue"} default button "Continue"
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
on bubblesort(theList)
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
repeat with i from (count theList) to 2 by -1
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
set a to beginning of o's lst
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
repeat with j from 2 to i
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
set b to item j of o's lst
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
if (a > b) then
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
set item (j - 1) of o's lst to b
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
set item j of o's lst to a
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
set a to b
Mail%20Rule%20Update%20v3%20with%20List%20Sort.applescript
set themeNames to name of every theme
create_keynotes_presentation.applescript
if the chosenTheme is false then error number -128
create_keynotes_presentation.applescript
set targetWidth to 1024
create_keynotes_presentation.applescript
set targetHeight to 768
create_keynotes_presentation.applescript
repeat with i from 1 to the count of children
create_keynotes_presentation.applescript
if the childCount ≠ 0 then
create_keynotes_presentation.applescript
if the paragraphCount is 1 then
create_keynotes_presentation.applescript
set the masterSlideName to "Section"
create_keynotes_presentation.applescript
set the masterSlideName to "Title"
create_keynotes_presentation.applescript
else if paragraphCount ≥ 3 then
create_keynotes_presentation.applescript
set thisSlide to make new slide with properties {base layout:slide layout masterSlideName}
create_keynotes_presentation.applescript
set wherefroms to cleanMdls(do shell script "mdls -name kMDItemWhereFroms " & quoted form of thePath)
Get-File-Metadata.applescript
set authors to cleanMdls(do shell script "mdls -name kMDItemAuthors " & quoted form of thePath)
Get-File-Metadata.applescript
on cleanMdls(mdls)
Get-File-Metadata.applescript
if mdls contains "null" then return missing value
Get-File-Metadata.applescript
set mdls to kl's split(kl's extractBetween(mdls, "(" & return, return & ")"), ",")
Get-File-Metadata.applescript
repeat with w in mdls
Get-File-Metadata.applescript
set contents of w to kl's TrimWhitespace(kl's SearchandReplace(w, "\"", ""))
Get-File-Metadata.applescript
if (count of mdls) = 1 then return item 1 of mdls
Get-File-Metadata.applescript
return mdls
Get-File-Metadata.applescript
end cleanMdls
Get-File-Metadata.applescript
set blueutilcmd to "/opt/homebrew/bin/blueutil"
Toggle bluetooth.applescript
set sb to last word of paragraph 1 of (do shell script blueutilcmd)
Toggle bluetooth.applescript
if sb is "1" then
Toggle bluetooth.applescript
do shell script blueutilcmd & " --power 0"
Toggle bluetooth.applescript
display notification "Bluetooth is now off!" sound name "chime"
Toggle bluetooth.applescript
do shell script blueutilcmd & " --power 1"
Toggle bluetooth.applescript
display notification "Bluetooth is now on!" sound name "chime"
Toggle bluetooth.applescript
say eventDescription
Speak Events.applescript
on run {projectFolder, parameters}
Make Project Folders.applescript
repeat with projectSubFolder in {"al done", "canon raw", "phase raw", "final files", "jpegs", "processed"}
Make Project Folders.applescript
if not (exists projectSubFolder) then
Make Project Folders.applescript
make new folder at projectFolder with properties {name:projectSubFolder}
Make Project Folders.applescript
set vDocumentIdA to ID of first document of first window
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vDocumentIdB to ID of first document of second window
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
if vDocumentIdA = vDocumentIdB then
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
error "The documents in the first window and second window are the same.\nChoose different documents in each window."
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vNameA to (its name) as string
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vSelectionA to selection of its window
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vLengthA to (length of vSelectionA) as integer
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
if vLengthA = 0 then
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
error "Nothing is selected in document: '" & vNameA & "'."
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vContentsA to (text of vSelectionA) as string
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vStartA to (characterOffset of vSelectionA) as integer
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vEndA to vStartA + vLengthA - 1
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vNameB to (its name) as string
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vSelectionB to selection of its window
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vLengthB to (length of vSelectionB) as integer
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
if vLengthB = 0 then
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
error "Nothing is selected in document: '" & vNameB & "'."
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vContentsB to (contents of vSelectionB) as string
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vStartB to (characterOffset of vSelectionB) as integer
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vEndB to vStartB + vLengthB - 1
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vDocumentExtractA to make document with properties {contents:vContentsA}
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vDocumentExtractIdA to ID of vDocumentExtractA
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set name of document id vDocumentExtractIdA to "¦" & vNameA & "¦" & vDocumentIdA & "," & vDocumentExtractIdA & "," & vStartA & "," & vEndA & "¦"
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vDocumentExtractB to make document with properties {contents:vContentsB}
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vDocumentExtractIdB to ID of vDocumentExtractB
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set name of document id vDocumentExtractIdB to "¦" & vNameB & "¦" & vDocumentIdB & "," & vDocumentExtractIdB & "," & vStartB & "," & vEndB & "¦"
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
set vCompareResults to compare document id vDocumentExtractIdA against document id vDocumentExtractIdB options {ignore RCS keywords:true}
0-%5B%E2%8C%98%E2%80%A6%5D-%5Bcompare_extracts%5D-%5B1%5D-%5Bopen_differences_window%5D.applescript
tell application "Transmission" to launch
transmissionLAH.applescript
tell application "System Events" to set visible of process "Transmission" to false
transmissionLAH.applescript
tell application "System Events" to keystroke "c" using {command down}
Copy-Text-and-Send-To-iTerm.applescript
set w to current window
Copy-Text-and-Send-To-iTerm.applescript
tell w's current session to write text (the clipboard)
Copy-Text-and-Send-To-iTerm.applescript
set _citekey to do shell script ¬
Add Zotero citekey.applescript