text
stringlengths
0
15.7k
source
stringlengths
6
112
return theTextEnc
dropbox-public-link-copy.scpt
end _urlEncode
dropbox-public-link-copy.scpt
set cmd to "mkdir " & ""
do shell script "mkdir".applescript
do shell script cmd
do shell script "mkdir".applescript
set qwote to "\""
Quotes.applescript
set dimensions to (do shell script "system_profiler SPDisplaysDataType | grep Resolution")
moveMouseRightMonitor.applescript
set primWidth to (word 2 of dimensions) + 0 # str -> number
moveMouseRightMonitor.applescript
set primHeight to (word 4 of dimensions) + 0 # str -> number
moveMouseRightMonitor.applescript
set posStr to do shell script "/opt/homebrew/bin/cliclick p"
moveMouseRightMonitor.applescript
set posRay to my split(posStr, ",")
moveMouseRightMonitor.applescript
set x to ((item 1 of posRay) + primWidth) # the difference between the two scripts (- vs +)
moveMouseRightMonitor.applescript
set y to ((item 2 of posRay) + 0)
moveMouseRightMonitor.applescript
set cliclick_path to "/opt/homebrew/bin/cliclick"
moveMouseRightMonitor.applescript
do shell script cliclick_path & " m:" & x & "," & y
moveMouseRightMonitor.applescript
return {x, y}
moveMouseRightMonitor.applescript
if browserName is "Microsoft Edge Canary" then
Current URL to clipboard md copy.applescript
tell application "Microsoft Edge Canary"
Current URL to clipboard md copy.applescript
set i to active tab of window 1
Current URL to clipboard md copy.applescript
set mdURL to "[" & title of i & "](" & URL of i & ")"
Current URL to clipboard md copy.applescript
set URL_list to mdURL & return & URL_list
Current URL to clipboard md copy.applescript
else if browserName is "Microsoft Edge" then
Current URL to clipboard md copy.applescript
property appname : "進捗どないや?"
Mrprogress.scpt
set projectlist to {}
Mrprogress.scpt
set reportType to ""
Mrprogress.scpt
set nextCursor to ""
Mrprogress.scpt
set nowCursor to ""
Mrprogress.scpt
display dialog "日報か?週報か?" buttons {"キャンセル", "日報", "週報"} with title appname
Mrprogress.scpt
set button_returned to button returned of result
Mrprogress.scpt
set reportType to button_returned
Mrprogress.scpt
if reportType is "日報" then
Mrprogress.scpt
set nowCursor to "今日"
Mrprogress.scpt
set nextCursor to "明日"
Mrprogress.scpt
else if reportType is "週報" then
Mrprogress.scpt
set nowCursor to "今週"
Mrprogress.scpt
set nextCursor to "来週"
Mrprogress.scpt
display dialog nowCursor & "なにやった?" & return & "(ぎょーさんある場合はカンマで区切ってな)" default answer "" with title appname
Mrprogress.scpt
set myResult to text returned of result
Mrprogress.scpt
set projectlist to my devText(myResult, ",")
Mrprogress.scpt
set x to 0
Mrprogress.scpt
set nmessage to ""
Mrprogress.scpt
set answerResults to ""
Mrprogress.scpt
repeat with i in projectlist
Mrprogress.scpt
if x is not 0 then set nmessage to "そうか、お疲れさん。" & return
Mrprogress.scpt
display dialog nmessage & i & "はどうやってん?" buttons {"OK"} default answer "" & return & return & return & return & return & return & return & return & return with title appname
Mrprogress.scpt
set answerResults to answerResults & "<h3>" & i & "</h3>" & "<p>" & theText & "</p>"
Mrprogress.scpt
display dialog "もう終わりか? 他にはないか?" buttons {"あらへん", "あったわ"} with title appname
Mrprogress.scpt
if button_returned is "あったわ" then
Mrprogress.scpt
display dialog "なんや言うてみい?" buttons {"OK"} default answer "" & return & return & return & return & return & return & return & return & return with title "進捗どないや?"
Mrprogress.scpt
set answerResults to answerResults & "<h3>その他</h3>" & "<p>" & theText & "</p>"
Mrprogress.scpt
else if button_returned is "あらへん" then
Mrprogress.scpt
display dialog nextCursor & "はどないする?" buttons {"OK"} default answer "" & return & return & return & return & return & return & return & return & return with title appname
Mrprogress.scpt
set answerResults to answerResults & "<h3>" & nextCursor & "に向けて</h3>" & "<p>" & theText & "</p>"
Mrprogress.scpt
set curnote to create note with html answerResults title date string of (current date) & "の" & reportType & "やで"
Mrprogress.scpt
display dialog "よっしゃ。Evernoteにノート作っといたで" buttons {"OK"} with title appname
Mrprogress.scpt
on devText(theText, aDelimiter)
Mrprogress.scpt
set AppleScript's text item delimiters to aDelimiter
Mrprogress.scpt
log theList
Mrprogress.scpt
end devText
Mrprogress.scpt
tell application "TextWrangler"
pygments-style.applescript
set docNameAndPath to POSIX path of (get file of front document)
pygments-style.applescript
set docName to POSIX path of (get name of front document)
pygments-style.applescript
set testn to docNameAndPath
pygments-style.applescript
set docNmNoSlash to "" & (do shell script "awk 'BEGIN {THISSTR=\"" & docName & "\"; sub(\"/\", \"\", THISSTR); print THISSTR}'")
pygments-style.applescript
set docPath to "" & (do shell script "awk 'BEGIN {THISSTR=\"" & testn & "\"; sub(/" & docNmNoSlash & "/, \"\", THISSTR); print THISSTR}'")
pygments-style.applescript
set shell to do script "# -----------CREATING PYGMENTS STYLE FILE in: " & docPath & " -----------" in window 1
pygments-style.applescript
do script "cd " & docPath in shell
pygments-style.applescript
do script "THISSUBDIR=\"fig\"" in shell
pygments-style.applescript
do script "if [ -d $THISSUBDIR ]; then echo \"### Subdir \"$THISSUBDIR\" exists ###\"; else mkdir $THISSUBDIR; fi" in shell
pygments-style.applescript
do script "THISSTYLE=\"paraiso-light\"; pygmentize -f tex -S $THISSTYLE -a .syntax > fig/style.tex" in shell
pygments-style.applescript
set track to getTrack()
add_spotify_track.AppleScript
addTrack(track)
add_spotify_track.AppleScript
on getTrack()
add_spotify_track.AppleScript
set artistName to artist of current track as string
add_spotify_track.AppleScript
set trackName to name of current track as string
add_spotify_track.AppleScript
return {artistName, trackName}
add_spotify_track.AppleScript
end getTrack
add_spotify_track.AppleScript
on displayNotice(track)
add_spotify_track.AppleScript
display notification "Added to your music" with title item 2 of track subtitle item 1 of track
add_spotify_track.AppleScript
end displayNotice
add_spotify_track.AppleScript
on addTrack(track)
add_spotify_track.AppleScript
set theURL to "https://maker.ifttt.com/trigger/YOUR_MAKER_EVENT_NAME_HERE/with/key/YOUR_MAKER_KEY_HERE?value1=" & (item 2 of track) & "&value2=" & (item 1 of track)
add_spotify_track.AppleScript
do shell script "curl " & quoted form of replace(" ", "+", theURL)
add_spotify_track.AppleScript
displayNotice(track)
add_spotify_track.AppleScript
end addTrack
add_spotify_track.AppleScript
on replace(search, replace, subject)
add_spotify_track.AppleScript
set AppleScript's text item delimiters to search
add_spotify_track.AppleScript
set AppleScript's text item delimiters to replace
add_spotify_track.AppleScript
set subject to "" & subject
add_spotify_track.AppleScript
set value of slider 1 of group 1 of tab group 1 of window 1 of process "System Preferences" to 0
Screen Brightness.applescript
 set user_name to "Ben"
Script 11-2.applescript
display dialog ("Hello " & user_name & "!")
Script 11-2.applescript
set baseName to do shell script "basename " & pathFile
JPGtoPNG.applescript
set baseName to text 1 thru -5 of baseName
JPGtoPNG.applescript
set destFile to destFolder & "/" & baseName & ".png"
JPGtoPNG.applescript
set destFile to quoted form of destFolder
JPGtoPNG.applescript
do shell script "sips -s format png " & pathFile & " --out " & destFile
JPGtoPNG.applescript
tell application "Reminders" to set todo_lists to (get name of every list)
get-lists.applescript
return todo_lists
get-lists.applescript
system attribute "LOGNAME"
system attribute "LOGNAME".applescript
tell application "FastScripts"
export fastscript shortcuts.scpt