text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
tell application "System Events" to open location _url
|
Search for Album Covers.applescript
|
displayError(error_message, error_number) of lib
|
Search for Album Covers.applescript
|
set tmp to splitString(q, " ")
|
VolumeAdjust.applescript
|
set q to item 1 of tmp
|
VolumeAdjust.applescript
|
if length of tmp is 2 then
|
VolumeAdjust.applescript
|
set change to item 2 of tmp
|
VolumeAdjust.applescript
|
set change to 10
|
VolumeAdjust.applescript
|
set current to output volume of (get volume settings)
|
VolumeAdjust.applescript
|
set old to current
|
VolumeAdjust.applescript
|
if q is equal to "mute" or q is equal to "off" then
|
VolumeAdjust.applescript
|
set current to 0
|
VolumeAdjust.applescript
|
else if q is equal to "max" or q is equal to "full" then
|
VolumeAdjust.applescript
|
set current to 100
|
VolumeAdjust.applescript
|
else if q is equal to "quiet" or q is equal to "soft" or q is equal to "low" then
|
VolumeAdjust.applescript
|
set current to 15
|
VolumeAdjust.applescript
|
else if q is equal to "medium" or q is equal to "half" or q is equal to "mid" then
|
VolumeAdjust.applescript
|
set current to 50
|
VolumeAdjust.applescript
|
else if q is equal to "loud" or q is equal to "high" then
|
VolumeAdjust.applescript
|
set current to 85
|
VolumeAdjust.applescript
|
else if q is equal to "up" or q is equal to "more" or q is equal to "+" then
|
VolumeAdjust.applescript
|
set current to current + change
|
VolumeAdjust.applescript
|
if (current > 100) then
|
VolumeAdjust.applescript
|
else if q is equal to "down" or q is equal to "less" or q is equal to "-" then
|
VolumeAdjust.applescript
|
set current to current - change
|
VolumeAdjust.applescript
|
if (current < 0) then
|
VolumeAdjust.applescript
|
else if q is equal to "current" or q is equal to "now" or q is equal to "status" or q is equal to "level"
|
VolumeAdjust.applescript
|
set current to current
|
VolumeAdjust.applescript
|
if (q as integer > 100) then
|
VolumeAdjust.applescript
|
else if (q as integer < 0) then
|
VolumeAdjust.applescript
|
set current to q
|
VolumeAdjust.applescript
|
set volume output volume current
|
VolumeAdjust.applescript
|
if (current as integer > old as integer)
|
VolumeAdjust.applescript
|
set message to "The volume has been increased to " & current & "/100"
|
VolumeAdjust.applescript
|
else if current is equal to old
|
VolumeAdjust.applescript
|
set message to "The current volume is " & current & "/100"
|
VolumeAdjust.applescript
|
set message to "The volume has been decreased to " & current & "/100"
|
VolumeAdjust.applescript
|
return message
|
VolumeAdjust.applescript
|
set apptoken to "GET_AN_APP_TOKEN"
|
micro.blog-fave-images.scpt
|
set myDate to current date
|
micro.blog-fave-images.scpt
|
set myNewDate to myDate - (7 * days)
|
micro.blog-fave-images.scpt
|
set scrpt to "curl -X GET -H \"Authorization: Bearer " & apptoken & "\" \"http://micro.blog/posts/favorites\""
|
micro.blog-fave-images.scpt
|
set thejson to do shell script scrpt
|
micro.blog-fave-images.scpt
|
set links to read JSON from thejson
|
micro.blog-fave-images.scpt
|
set linkstopost to ""
|
micro.blog-fave-images.scpt
|
repeat with n from 1 to count of item 4 of items of links
|
micro.blog-fave-images.scpt
|
set link to item n of item 4 of items of links
|
micro.blog-fave-images.scpt
|
set tusername to username of _microblog of author of link
|
micro.blog-fave-images.scpt
|
set tdate_published to date_published of link
|
micro.blog-fave-images.scpt
|
set tid to |id| of link
|
micro.blog-fave-images.scpt
|
set tcontent_html to content_html of link
|
micro.blog-fave-images.scpt
|
set turl to |url| of link
|
micro.blog-fave-images.scpt
|
set aslinkdate to my convertDate(tdate_published)
|
micro.blog-fave-images.scpt
|
if aslinkdate < myNewDate then exit repeat
|
micro.blog-fave-images.scpt
|
if ((offset of "<img" in tcontent_html) > 0) then
|
micro.blog-fave-images.scpt
|
set imgsrc to my getFirstImageSrc(tcontent_html)
|
micro.blog-fave-images.scpt
|
set linkstopost to linkstopost & "<a href='" & turl & "'><img src='https://CLOUDIMAGETOKEN.cloudimg.io/cover/120x120/n/" & imgsrc & "'></a>"
|
micro.blog-fave-images.scpt
|
make new text window ¬
|
micro.blog-fave-images.scpt
|
with properties {contents:linkstopost}
|
micro.blog-fave-images.scpt
|
end tell -- application "BBEdit"
|
micro.blog-fave-images.scpt
|
to getFirstImageSrc(html)
|
micro.blog-fave-images.scpt
|
set AppleScript's text item delimiters to "<img"
|
micro.blog-fave-images.scpt
|
set html to text item 2 of html
|
micro.blog-fave-images.scpt
|
set AppleScript's text item delimiters to ">"
|
micro.blog-fave-images.scpt
|
set html to text item 1 of html
|
micro.blog-fave-images.scpt
|
set AppleScript's text item delimiters to "src=\""
|
micro.blog-fave-images.scpt
|
return text item 1 of html
|
micro.blog-fave-images.scpt
|
set AppleScript's text item delimiters to "src='"
|
micro.blog-fave-images.scpt
|
set AppleScript's text item delimiters to "'"
|
micro.blog-fave-images.scpt
|
end getFirstImageSrc
|
micro.blog-fave-images.scpt
|
to convertDate(textdate)
|
micro.blog-fave-images.scpt
|
set the year of resultDate to (text 1 thru 4 of textdate)
|
micro.blog-fave-images.scpt
|
set the month of resultDate to (text 6 thru 7 of textdate)
|
micro.blog-fave-images.scpt
|
set the day of resultDate to (text 9 thru 10 of textdate)
|
micro.blog-fave-images.scpt
|
if (length of textdate) > 10 then
|
micro.blog-fave-images.scpt
|
set the hours of resultDate to (text 12 thru 13 of textdate)
|
micro.blog-fave-images.scpt
|
set the minutes of resultDate to (text 15 thru 16 of textdate)
|
micro.blog-fave-images.scpt
|
if (length of textdate) > 16 then
|
micro.blog-fave-images.scpt
|
set the seconds of resultDate to (text 18 thru 19 of textdate)
|
micro.blog-fave-images.scpt
|
end convertDate
|
micro.blog-fave-images.scpt
|
run script (quoteString("Bob\\Jeff is \"my\" name."))
|
quoteString.applescript
|
on quoteString(someString)
|
quoteString.applescript
|
set charDQ to ASCII character 34 -- double-quote character
|
quoteString.applescript
|
set charBS to ASCII character 92 -- backslash character
|
quoteString.applescript
|
set escapedDQ to charBS & charDQ
|
quoteString.applescript
|
set escapedBS to charBS & charBS
|
quoteString.applescript
|
set someString to replaceSimple({someString, charBS, escapedBS})
|
quoteString.applescript
|
set someString to replaceSimple({someString, charDQ, escapedDQ})
|
quoteString.applescript
|
set someString to charDQ & someString & charDQ
|
quoteString.applescript
|
tell application "iTunes" to set view of (browser window 1) to user playlist 1
|
Music copy.applescript
|
tell application "System Events" to set MailRun to (count of (every process whose name is "Mail")) > 0
|
RestartMail.applescript
|
if MailRun then
|
RestartMail.applescript
|
tell application "Mail" to open
|
RestartMail.applescript
|
repeat with i from 1 to 20
|
MRDC deepfreeze helper.applescript
|
DF_unlock()
|
MRDC deepfreeze helper.applescript
|
on CAD_ks()
|
MRDC deepfreeze helper.applescript
|
key code 117 using {control down, option down}
|
MRDC deepfreeze helper.applescript
|
keystroke "`" using command down
|
MRDC deepfreeze helper.applescript
|
end CAD_ks
|
MRDC deepfreeze helper.applescript
|
on DF_unlock()
|
MRDC deepfreeze helper.applescript
|
key code 97 using {option down, control down, shift down}
|
MRDC deepfreeze helper.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.