text
stringlengths
0
15.7k
source
stringlengths
6
112
set the day of targetDate to (item (theDay of thePositions) of theText) as number
Later.applescript
if targetDate is less than (current date) then
Later.applescript
set the year of targetDate to (the year of (current date)) + 1
Later.applescript
return targetDate
Later.applescript
end understandAbsoluteDate
Later.applescript
to adjustPositionsForNoYear(thePositions)
Later.applescript
if (theYear in thePositions) is 1 then
Later.applescript
set (theMonth in thePositions) to (theMonth in thePositions) - 1
Later.applescript
set (theDay in thePositions) to (theDay in thePositions) - 1
Later.applescript
else if yearPosition is 2 then
Later.applescript
if (theDay in thePositions) < (theMonth in thePositions) then
Later.applescript
end adjustPositionsForNoYear
Later.applescript
to solveTheYear(num)
Later.applescript
if num ≥ 1000 then
Later.applescript
return (2000 + num)
Later.applescript
end solveTheYear
Later.applescript
to getDate(theInput)
Later.applescript
set desiredDate to (current date)
Later.applescript
set time of desiredDate to 0
Later.applescript
set secondsDeferred to englishTime(theInput)
Later.applescript
if secondsDeferred = -1 then
Later.applescript
set timesUsedSinceError to 0
Later.applescript
set timesUsedSinceError to timesUsedSinceError + 1
Later.applescript
return desiredDate + secondsDeferred
Later.applescript
set playlistUrl to "spotify:user:spotify:playlist:37i9dQZF1DWXCIgX3kyeVF"
SpotifyPlayPlaylist.applescript
set shuffling to false
SpotifyPlayPlaylist.applescript
set shuffling to true
SpotifyPlayPlaylist.applescript
play track my playlistUrl
SpotifyPlayPlaylist.applescript
tell application "Spotify" to launch
SpotifyPlayPlaylist.applescript
delay 4 -- edit the delay value if necessary
SpotifyPlayPlaylist.applescript
if not (application "AnyBar" exists) then
zoom-toggle-mute.applescript
error "AnyBar not installed, either remove line 23 or download AnyBar from 'https://github.com/tonsky/AnyBar'"
zoom-toggle-mute.applescript
if notInMeeting() then error "not in a meeting"
zoom-toggle-mute.applescript
tell menu bar item 3
zoom-toggle-mute.applescript
tell menu "Meeting"
zoom-toggle-mute.applescript
if menu item "Mute Audio" exists then
zoom-toggle-mute.applescript
click menu item "Mute Audio"
zoom-toggle-mute.applescript
set diag to "Audio is muted"
zoom-toggle-mute.applescript
set c to "white"
zoom-toggle-mute.applescript
else if menu item "Unmute Audio" exists then
zoom-toggle-mute.applescript
click menu item "Unmute Audio"
zoom-toggle-mute.applescript
set c to "red"
zoom-toggle-mute.applescript
set diag to "Audio is Unmuted"
zoom-toggle-mute.applescript
do shell script "/bin/echo -n " & c & " | nc -4u -w0 localhost ${2:-1738}"
zoom-toggle-mute.applescript
display notification (diag) with title ("Toggle zoom audio")
zoom-toggle-mute.applescript
on notInMeeting()
zoom-toggle-mute.applescript
if application "zoom.us" is not running then return false
zoom-toggle-mute.applescript
tell menu bar item "zoom.us"
zoom-toggle-mute.applescript
return (enabled of menu item "Join Meeting...")
zoom-toggle-mute.applescript
end notInMeeting
zoom-toggle-mute.applescript
set value of slider 1 of window 1 to get (value of slider 1 of window 1) + 2
sonos-volume-up.scpt
open POSIX file "/path/to/some.scpt"
to-app.scpt
save front document as "application" in POSIX file "/path/to/any.app"
to-app.scpt
set logger to std's import("logger")'s new("setup-applescript-core-project-path")
setup-applescript-core-project-path.applescript
set PROJECT_PATH_KEY to "AppleScript Core Project Path"
setup-applescript-core-project-path.applescript
set projectPath to textUtil's replace(result, "/scripts/setup-applescript-core-project-path.applescript", "")
setup-applescript-core-project-path.applescript
do shell script "plutil -replace '" & PROJECT_PATH_KEY & "' -string \"" & projectPath & "\" ~/applescript-core/config-system.plist"
setup-applescript-core-project-path.applescript
set projectKey to "Project applescript-core"
setup-applescript-core-project-path.applescript
set projectList to configUser's getList("AppleScript Projects Path")
setup-applescript-core-project-path.applescript
configUser's setValue("AppleScript Projects Path", projectList)
setup-applescript-core-project-path.applescript
set theTitle to "クリップボードのデータを編集"
edit_clipboard.applescript
set judgeStr to clipboard info for string
edit_clipboard.applescript
if judgeStr ≠ {} then
edit_clipboard.applescript
set strClipboard to the clipboard
edit_clipboard.applescript
else if judgeStr = {} then
edit_clipboard.applescript
display alert "クリップボードに文字列が入っていないようです!" buttons {"OK"}
edit_clipboard.applescript
set {buttonVal, textVal} to {button returned, text returned} of (display dialog "このクリップボードの情報をどうしますか?" default answer strClipboard with title theTitle buttons {"削除", "この内容で上書き", "なにもしない"})
edit_clipboard.applescript
if buttonVal is "この内容で編集" then
edit_clipboard.applescript
set the clipboard to textVal
edit_clipboard.applescript
else if buttonVal is "削除" then
edit_clipboard.applescript
set keyDelay to 0.01
zotpick-pandoc for Scrivener.applescript
set appName to "Scrivener"
zotpick-pandoc for Scrivener.applescript
set zotRunning to do shell script "/usr/bin/curl 'http://127.0.0.1:23119/better-bibtex/cayw?probe=probe' 2>/dev/null; exit 0"
zotpick-pandoc for Scrivener.applescript
if zotRunning is "ready" then
zotpick-pandoc for Scrivener.applescript
set theReference to do shell script "/usr/bin/curl 'http://127.0.0.1:23119/better-bibtex/cayw?format=pandoc' 2>/dev/null; exit 0"
zotpick-pandoc for Scrivener.applescript
repeat with letter in theReference
zotpick-pandoc for Scrivener.applescript
keystroke letter
zotpick-pandoc for Scrivener.applescript
delay keyDelay
zotpick-pandoc for Scrivener.applescript
set alertTitle to "Zotero not running"
zotpick-pandoc for Scrivener.applescript
set alertMessage to "This script will not work unless Zotero is running. Please launch Zotero and try again."
zotpick-pandoc for Scrivener.applescript
set alertTitle to "Better BibTeX not installed"
zotpick-pandoc for Scrivener.applescript
set alertMessage to "This script will not work unless Better BibTeX is installed. Please make sure that Better BibTeX is installed in the running instance of Zotero."
zotpick-pandoc for Scrivener.applescript
display alert alertTitle message alertMessage
zotpick-pandoc for Scrivener.applescript
tell application "Safari" to set the bounds of the front window to {0, 20, 800, 1200}
Traffic&Weather.scpt
keystroke "-" using command down
Traffic&Weather.scpt
tell application "Safari" to set the bounds of the front window to {801, 20, 1277, 500}
Traffic&Weather.scpt
keystroke "2" using command down
Traffic&Weather.scpt
tell application "Safari" to set the bounds of the front window to {801, 501, 1277, 1200}
Traffic&Weather.scpt
keystroke "3" using command down
Traffic&Weather.scpt
keystroke "~" using command down
Traffic&Weather.scpt
repeat 400 times
Traffic&Weather.scpt
global mailSignatureFile
email_signature.applescript
global mailSignatureFilePosix
email_signature.applescript
global okButton
email_signature.applescript
set supportedOsVersion to "10.10"
email_signature.applescript
set okButton to "OK"
email_signature.applescript
set cancelButton to "Cancel"
email_signature.applescript
set placeholderText to "PlaceHolder - To be replaced"
email_signature.applescript
set emailSignatureName to "AutoSignature"
email_signature.applescript
on displayError(msg)
email_signature.applescript