text
stringlengths
0
15.7k
source
stringlengths
6
112
set AppleScript's text item delimiters to originalDelimiter
whatsapp_abid.scpt
on create_folder(folder_location, folder_name)
Script 18-10.applescript
make new folder at folder_location with properties {name:folder_name}
Script 18-10.applescript
play --toggle play, pause
play copy.applescript
set fileType to display dialog "Create disk image of a " buttons {"Folder", "File", "Cancel"} ¬
Create%20Disk%20Image.applescript
default button ¬
Create%20Disk%20Image.applescript
"Folder" cancel button ¬
Create%20Disk%20Image.applescript
"Cancel" with title "Create Disk Image"
Create%20Disk%20Image.applescript
if button returned of fileType is "Folder" then
Create%20Disk%20Image.applescript
set input to choose folder with prompt "Choose folder to make disk image of:"
Create%20Disk%20Image.applescript
else if button returned of fileType is "File" then
Create%20Disk%20Image.applescript
set input to choose file with prompt "Choose file to make disk image of:"
Create%20Disk%20Image.applescript
if kind of input is "Folder" then
Create%20Disk%20Image.applescript
set sourceFolder to POSIX path of input
Create%20Disk%20Image.applescript
set sourceFolder to text 1 thru text item -1 of sourceFolder
Create%20Disk%20Image.applescript
set parentDir to text 1 thru text item -2 of sourceFolder & "/"
Create%20Disk%20Image.applescript
tell application "Finder" to set dmgname to name of (input as alias)
Create%20Disk%20Image.applescript
set outputPath to parentDir & dmgname & ".dmg"
Create%20Disk%20Image.applescript
set debug to (do shell script "hdiutil create -volname " & quoted form of dmgname & " -srcfolder " & quoted form of sourceFolder & " -format UDZO -ov " & quoted form of outputPath & " -debug")
Create%20Disk%20Image.applescript
display notification "Out path:" & outputPath with title "Disk Image Created"
Create%20Disk%20Image.applescript
set parentDir to POSIX path of (input as alias)
Create%20Disk%20Image.applescript
tell application "Finder" to set fullFileName to name of input
Create%20Disk%20Image.applescript
set parentDir to text 1 thru text item -2 of parentDir & "/"
Create%20Disk%20Image.applescript
set dmgname to text 1 thru text item -2 of fullFileName
Create%20Disk%20Image.applescript
set debug to (do shell script "hdiutil create -volname " & quoted form of dmgname & " -srcfolder " & quoted form of parentDir & fullFileName & " -format UDZO -ov " & quoted form of outputPath & " -debug")
Create%20Disk%20Image.applescript
return outputPath
Create%20Disk%20Image.applescript
set ssearch to display dialog "Search Notational Velocity" default answer ""
NV-Search.applescript
set ssearch to text returned of ssearch
NV-Search.applescript
search ssearch
NV-Search.applescript
if documents is {} then
Open JIRA copy 5.applescript
set this_doc to make new document at the beginning of documents
Open JIRA copy 5.applescript
my new_tab()
Open JIRA copy 5.applescript
set the URL of the document 1 to paragraph n of URLtoOpen
Open JIRA copy 5.applescript
click menu item "Dynamic Switching" of menu 1
gpu_switch.applescript
set tab to target of window 1
duplicatefindertab.scpt
set target of window 1 to tab
duplicatefindertab.scpt
if type = integer or type = boolean then
listenbrainz.applescript
else if type = text then
listenbrainz.applescript
else if type = list then
listenbrainz.applescript
else if type = script then
listenbrainz.applescript
end encodeList
listenbrainz.applescript
if (class of codepoints) is not list then
listenbrainz.applescript
if codepoint = 34 then
listenbrainz.applescript
else if codepoint ≥ 32 and codepoint < 127 then
listenbrainz.applescript
end encodeString
listenbrainz.applescript
set rv to (character (1 + digit) of digit_list) & rv
listenbrainz.applescript
end hex4
listenbrainz.applescript
end setkv
listenbrainz.applescript
end toJson
listenbrainz.applescript
end createDictWith
listenbrainz.applescript
end createDict
listenbrainz.applescript
set libraryName = "Library"
listenbrainz.applescript
set listenbrainzToken = "........................."
listenbrainz.applescript
if current track is not loved then
listenbrainz.applescript
set loved of current track to not loved of current track
listenbrainz.applescript
duplicate current track to source libraryName
listenbrainz.applescript
set curlcmd to "curl -H \"Authorization: token " & listenbrainzToken & \" -H \"Content-Type: application/json\""
listenbrainz.applescript
set track_metadata to my createDictWith({{"artist_name", artistName}, {"track_name", trackName}})
listenbrainz.applescript
set payload to my createDictWith({{"listened_at", ((do shell script "date +%s") as string)}, {"track_metadata", track_metadata}})
listenbrainz.applescript
set curldata to my createDict()
listenbrainz.applescript
curldata's setkv("listen_type", "single")
listenbrainz.applescript
curldata's setkv("payload", {payload})
listenbrainz.applescript
set encoded to my encode(curldata)
listenbrainz.applescript
set curlurl to "https://api.listenbrainz.org/1/submit-listens"
listenbrainz.applescript
do shell script curlcmd & " -d " & quoted form of encoded & " " & curlurl
listenbrainz.applescript
set activeChrome to first application process whose name is "Google Chrome"
btt-chrome-cycle-tabs.scpt
set appName to name of window 1 of activeChrome
btt-chrome-cycle-tabs.scpt
tell application "Google Chrome" to make new window
btt-chrome-cycle-tabs.scpt
if "Google Chrome" is not in activeApp then
btt-chrome-cycle-tabs.scpt
set firstWIndow to -1
btt-chrome-cycle-tabs.scpt
set firstIndex to -1
btt-chrome-cycle-tabs.scpt
set nextWindow to -1
btt-chrome-cycle-tabs.scpt
set nextIndex to -1
btt-chrome-cycle-tabs.scpt
set found to -1
btt-chrome-cycle-tabs.scpt
if firstWIndow is equal to -1 then
btt-chrome-cycle-tabs.scpt
set firstWIndow to w
btt-chrome-cycle-tabs.scpt
set firstIndex to i
btt-chrome-cycle-tabs.scpt
if (i is greater than active tab index of w or w is not firstWIndow) and nextWindow is equal to -1 then
btt-chrome-cycle-tabs.scpt
set nextWindow to w
btt-chrome-cycle-tabs.scpt
set nextIndex to i
btt-chrome-cycle-tabs.scpt
if nextWindow is not -1 then
btt-chrome-cycle-tabs.scpt
set active tab index of nextWindow to nextIndex
btt-chrome-cycle-tabs.scpt
set index of nextWindow to 1
btt-chrome-cycle-tabs.scpt
if firstWIndow is not -1 then
btt-chrome-cycle-tabs.scpt
set active tab index of firstWIndow to firstIndex
btt-chrome-cycle-tabs.scpt
set index of firstWIndow to 1
btt-chrome-cycle-tabs.scpt
readXMLFile({posixPath:"/my/fake/path/someFile.xml"})
readXMLFile.applescript
on readXMLFile(prefs)
readXMLFile.applescript
set defaultPrefs to {posixPath:null}
readXMLFile.applescript
set posixPath to posixPath of prefs
readXMLFile.applescript
if posixPath is null then error "path not specified" number -1024
readXMLFile.applescript
set xmlContents to contents of XML file posixPath
readXMLFile.applescript
set xmlRoot to a reference to XML element 1 of xmlContents
readXMLFile.applescript
return xmlRoot
readXMLFile.applescript
error "unable to readXMLFile - " & errMsg number errNum
readXMLFile.applescript
end readXMLFile
readXMLFile.applescript
global check
Images - Show only RGB images.applescript
set imageName to file path of image 1 as string
Images - Show only RGB images.applescript
set suppress printing to 0
Images - Show only RGB images.applescript
set check to 0
Images - Show only RGB images.applescript