text
stringlengths
0
15.7k
source
stringlengths
6
112
set returnValue to "LIVE MIC"
zoomMuteState.1s.scpt
set returnValue to "MUTED"
zoomMuteState.1s.scpt
return returnValue & "| size=18
zoomMuteState.1s.scpt
zoomMuteState"
zoomMuteState.1s.scpt
property ca : current application
Toggle Desktop Icons.applescript
property NSUserDefaults : class "NSUserDefaults"
Toggle Desktop Icons.applescript
property defaultsSuite : missing value
Toggle Desktop Icons.applescript
property suiteID : "com.apple.finder"
Toggle Desktop Icons.applescript
set defaultsSuite to NSUserDefaults's alloc's initWithSuiteName:suiteID
Toggle Desktop Icons.applescript
to setValueForKey(keyName, value)
Toggle Desktop Icons.applescript
if defaultsSuite = missing value then my init()
Toggle Desktop Icons.applescript
defaultsSuite's setObject:value forKey:keyName
Toggle Desktop Icons.applescript
end setValueForKey
Toggle Desktop Icons.applescript
to getValueForKey(keyName)
Toggle Desktop Icons.applescript
return defaultsSuite's objectForKey:keyName
Toggle Desktop Icons.applescript
end getValueForKey
Toggle Desktop Icons.applescript
to setSuiteValues(keyValueRecord)
Toggle Desktop Icons.applescript
NSUserDefaults's alloc's setPersistentDomain:keyValueRecord forName:suiteID
Toggle Desktop Icons.applescript
end setSuiteValues
Toggle Desktop Icons.applescript
to getSuiteValues()
Toggle Desktop Icons.applescript
return (NSUserDefaults's alloc's persistentDomainForName:suiteID)
Toggle Desktop Icons.applescript
end getSuiteValues
Toggle Desktop Icons.applescript
to coerceObjToAS(obj)
Toggle Desktop Icons.applescript
return item 1 of (current application's NSArray's arrayWithObject:obj) as list
Toggle Desktop Icons.applescript
end coerceObjToAS
Toggle Desktop Icons.applescript
to relaunchApplication(applicationName)
Toggle Desktop Icons.applescript
tell application applicationName to quit
Toggle Desktop Icons.applescript
repeat while counter < 10
Toggle Desktop Icons.applescript
if applicationName is not in (name of application processes) then exit repeat
Toggle Desktop Icons.applescript
set counter to counter + 1
Toggle Desktop Icons.applescript
tell application applicationName to activate
Toggle Desktop Icons.applescript
end relaunchApplication
Toggle Desktop Icons.applescript
set targetKey to "CreateDesktop"
Toggle Desktop Icons.applescript
set prevValue to first item of coerceObjToAS(getValueForKey(targetKey)) as boolean
Toggle Desktop Icons.applescript
set newValue to not prevValue
Toggle Desktop Icons.applescript
setValueForKey(targetKey, newValue)
Toggle Desktop Icons.applescript
relaunchApplication("Finder")
Toggle Desktop Icons.applescript
set volume with output muted
Screensaver.applescript
pause
Screensaver.applescript
tell application "ScreenSaverEngine" to activate
Screensaver.applescript
tell application "System Events" to tell process "Music"
resize_windows_04.applescript
set position to {800, 600}
resize_windows_04.applescript
set size to {1000, 650}
resize_windows_04.applescript
tell application "System Events" to tell process "TV"
resize_windows_04.applescript
set position to {240, 320}
resize_windows_04.applescript
tell application "System Events" to tell process "Photos"
resize_windows_04.applescript
set position to {600, 450}
resize_windows_04.applescript
using terms from application "Mail"
save_Attachment_to_Downloads_Folder.applescript
on perform mail action with messages theMessages for rule theRule
save_Attachment_to_Downloads_Folder.applescript
set businesspartner to name of theRule
save_Attachment_to_Downloads_Folder.applescript
set attachmentsFolder to ((path to home folder as text) & "Downloads") as text
save_Attachment_to_Downloads_Folder.applescript
repeat with eachMessage in theMessages
save_Attachment_to_Downloads_Folder.applescript
set {year:y, month:m, day:d, hours:h, minutes:min} to eachMessage's date sent
save_Attachment_to_Downloads_Folder.applescript
set timeStamp to ("" & y & "-" & my pad(m as integer) & "-" & my pad(d))
save_Attachment_to_Downloads_Folder.applescript
repeat with theAttachment in eachMessage's mail attachments
save_Attachment_to_Downloads_Folder.applescript
set originalName to name of theAttachment
save_Attachment_to_Downloads_Folder.applescript
set savePath to attachmentsFolder & ":" & timeStamp & " - " & businesspartner & " " & originalName
save_Attachment_to_Downloads_Folder.applescript
save theAttachment in file (savePath)
save_Attachment_to_Downloads_Folder.applescript
end perform mail action with messages
save_Attachment_to_Downloads_Folder.applescript
on pad(n)
save_Attachment_to_Downloads_Folder.applescript
return text -2 thru -1 of ("00" & n)
save_Attachment_to_Downloads_Folder.applescript
end pad
save_Attachment_to_Downloads_Folder.applescript
on playSong(songLetter)
playRand.scpt
tell application "Music"
playRand.scpt
set theTracks to tracks of library playlist 1 whose name starts with songLetter
playRand.scpt
set randomTrack to item (random number from 1 to (count of theTracks)) of theTracks
playRand.scpt
play randomTrack
playRand.scpt
end playSong
playRand.scpt
set theLetter to item 1 of argv
playRand.scpt
playSong(theLetter)
playRand.scpt
set greeting to "Hello, world!"
helloworld.applescript
set greeting to linefeed & greeting & linefeed
helloworld.applescript
greeting
helloworld.applescript
set source_file to choose file with prompt "Where is the HTML or HTM file?" of type {"htm", "html"}
Pandoc-HTMLtoPDF.applescript
set path_file to POSIX path of source_file
Pandoc-HTMLtoPDF.applescript
set dest_file to choose folder with prompt "Where to save the PDF file?"
Pandoc-HTMLtoPDF.applescript
set dest_file to POSIX path of dest_file
Pandoc-HTMLtoPDF.applescript
tell application "Finder" to set {dispName, nameExt, isHidden} to the {displayed name, name extension, extension hidden} of source_file
Pandoc-HTMLtoPDF.applescript
if isHidden or nameExt is equal to "" then
Pandoc-HTMLtoPDF.applescript
dispName
Pandoc-HTMLtoPDF.applescript
(characters 1 through (-2 - (count of nameExt)) of dispName) as text
Pandoc-HTMLtoPDF.applescript
set baseName to result
Pandoc-HTMLtoPDF.applescript
do shell script "/usr/local/bin/pandoc -f html " & path_file & " -t pdf -o " & dest_file & baseName & ".pdf"
Pandoc-HTMLtoPDF.applescript
do shell script "defaults read com.apple.finder CreateDesktop"
ToggleDesktop.scpt
do shell script "defaults delete com.apple.finder CreateDesktop"
ToggleDesktop.scpt
do shell script "defaults write com.apple.finder CreateDesktop -bool FALSE"
ToggleDesktop.scpt
tell application "Finder" to quit
ToggleDesktop.scpt
tell application "Finder" to launch
ToggleDesktop.scpt
set theSelection to get selection as alias list
Open With Emacs.applescript
tell application "Emacs"
Open With Emacs.applescript
repeat with theFile in theSelection
Open With Emacs.applescript
open theFile
Open With Emacs.applescript
display notification "This is a notification" with title "Title" subtitle "Subtitle"
example_notification.scpt
set the current pane to pane "com.apple.preference.displays"
display.applescript
repeat until exists tab group 1 of window "ASUS PB278 (1)"
display.applescript
tell tab group 1 of window "ASUS PB278 (1)"
display.applescript
click radio button "Display"
display.applescript
click radio button "Scaled"
display.applescript
select row 2 of table 1 of scroll area 1
display.applescript
repeat until exists tab group 1 of group 1 of window "ASUS PB278 (1)"
display.applescript