text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
set vURL to (vURLValue's absoluteString()) as string | open_link_copied_to_clipboard_in_BBEdit.applescript |
return {pURL:vURL, pContents:(vDownloadedNSString as string), pMIMEType:vMIMEType, pTextEncoding:vTextEncoding} | open_link_copied_to_clipboard_in_BBEdit.applescript |
end getRemoteContents | open_link_copied_to_clipboard_in_BBEdit.applescript |
set vURL to the clipboard as string | open_link_copied_to_clipboard_in_BBEdit.applescript |
if not ((vURL starts with "http://") or (vURL starts with "https://") or (vURL starts with "ftp://") or (vURL starts with "sftp://")) then | open_link_copied_to_clipboard_in_BBEdit.applescript |
error "The contents of the clipboard is not a valid URL." & linefeed & linefeed & "The clipboard's contents:" & linefeed & the quoted form of vURL | open_link_copied_to_clipboard_in_BBEdit.applescript |
set {pURL:vURL, pContents:vContents, pMIMEType:vMIMEType, pTextEncoding:vTextEncoding} to my getRemoteContents(vURL) | open_link_copied_to_clipboard_in_BBEdit.applescript |
make new document at beginning with properties {name:vURL, contents:vContents} | open_link_copied_to_clipboard_in_BBEdit.applescript |
display alert aMessage as critical | open_link_copied_to_clipboard_in_BBEdit.applescript |
go fuck yourself | no-comment.scpt |
on replace(s, f, r) | replace.applescript |
set AppleScript's text item delimiters to f | replace.applescript |
set _ to text items in s | replace.applescript |
set AppleScript's text item delimiters to r | replace.applescript |
text items of _ as string | replace.applescript |
replace("AppleScript", "Apple", "Java") | replace.applescript |
property defaultFileName : "newFile.txt" -- change to your preferred file name... | newEmptyFile.scpt |
tell me to activate -- makes display dialog frontmost momentarily. | newEmptyFile.scpt |
set theFileName to text returned of (display dialog "Enter a file name:" default answer defaultFileName) | newEmptyFile.scpt |
if the (count of windows) is not 0 then | newEmptyFile.scpt |
set theFolder to (folder of the front window) as text | newEmptyFile.scpt |
set theFolder to POSIX path of theFolder | newEmptyFile.scpt |
set theFolder to POSIX path of (get path to desktop) | newEmptyFile.scpt |
set addedFile to (theFolder & theFileName) | newEmptyFile.scpt |
do shell script "touch '" & addedFile & "'" | newEmptyFile.scpt |
set addedFile to (POSIX file addedFile) as alias | newEmptyFile.scpt |
select addedFile | newEmptyFile.scpt |
set the messageId to text 11 thru -1 of this_URL | openOutlookLocation.scpt |
open message id messageId | openOutlookLocation.scpt |
set renameCommand to homeFolder & ".local/bin/rename-case" | Rename Case.applescript |
set availableCases to paragraphs of (do shell script renameCommand & " -L") | Rename Case.applescript |
set theCase to (choose from list availableCases with prompt "Choose case:") | Rename Case.applescript |
if theCase is false then return | Rename Case.applescript |
set renameCommand to renameCommand & " -C " & theCase | Rename Case.applescript |
on open (selectedFiles) | Rename Case.applescript |
renameFiles(selectedFiles) | Rename Case.applescript |
tell application "Finder" to set selectedFiles to selection | Rename Case.applescript |
set docItem to first item of documents | Toggle%20Safari%20Mute.applescript |
set tabName to name of docItem | Toggle%20Safari%20Mute.applescript |
tell window tabName | Toggle%20Safari%20Mute.applescript |
tell button 3 of group 4 of toolbar 1 | Toggle%20Safari%20Mute.applescript |
if exists (menu item "Mute This Tab" of menu 1 of group 4 of toolbar 1) then | Toggle%20Safari%20Mute.applescript |
click menu item "Mute This Tab" of menu 1 of group 4 of toolbar 1 | Toggle%20Safari%20Mute.applescript |
else if exists (menu item "Unmute This Tab" of menu 1 of group 4 of toolbar 1) then | Toggle%20Safari%20Mute.applescript |
click menu item "Unmute This Tab" of menu 1 of group 4 of toolbar 1 | Toggle%20Safari%20Mute.applescript |
on error toolbarErrMsg | Toggle%20Safari%20Mute.applescript |
return "Error Level::Toggle Mute:" & space & toolbarErrMsg | Toggle%20Safari%20Mute.applescript |
return "Error Level::Top:" & space & errMsg | Toggle%20Safari%20Mute.applescript |
set trackRecordList to {} | save_itunes_song_ratings.applescript |
set trackRecordList to my get_track_records() | save_itunes_song_ratings.applescript |
my write_track_records(filePath, trackRecordList) | save_itunes_song_ratings.applescript |
on get_track_records() | save_itunes_song_ratings.applescript |
set trackList to every track of playlist musicList of source rootSource whose rating > 0 | save_itunes_song_ratings.applescript |
repeat with t in trackList | save_itunes_song_ratings.applescript |
set trackRecord to {artist:(artist of t), album:(album of t), name:(name of t), rating:(rating of t)} | save_itunes_song_ratings.applescript |
set end of trackRecordList to trackRecord | save_itunes_song_ratings.applescript |
return trackRecordList | save_itunes_song_ratings.applescript |
end get_track_records | save_itunes_song_ratings.applescript |
on write_track_records(filePath, trackRecordList) | save_itunes_song_ratings.applescript |
set fileRef to open for access file filePath with write permission | save_itunes_song_ratings.applescript |
repeat with t in trackRecordList | save_itunes_song_ratings.applescript |
set metadata to (artist of t) & tab & (album of t) & tab & (name of t) & tab & (rating of t) as text | save_itunes_song_ratings.applescript |
write (metadata & return) to fileRef starting at eof | save_itunes_song_ratings.applescript |
end write_track_records | save_itunes_song_ratings.applescript |
set fol to POSIX path of ((item 1 of sel) as text) | OpenDirectoryTerminal.AppleScript |
if (count of windows) is not 0 then | OpenDirectoryTerminal.AppleScript |
do script "cd " & quoted form of fol & ";clear" in window 1 | OpenDirectoryTerminal.AppleScript |
do script "cd " & quoted form of fol & ";clear" | OpenDirectoryTerminal.AppleScript |
mouseMove's mouseMove({mouseKey:"2"}) | mouseMoveDown.applescript |
tell application "Mailplane 3" | send-to-omnifocus.scpt |
set theEmailUrl to currentURL | send-to-omnifocus.scpt |
set theGmailUrl to my replace_chars(theEmailUrl, "mailplane://bradley.wright%40digital.cabinet-office.gov.uk/", "https://mail.google.com/mail/ca/u/0/") | send-to-omnifocus.scpt |
set theSubject to currentTitle | send-to-omnifocus.scpt |
set theTask to theSubject | send-to-omnifocus.scpt |
set theNote to theEmailUrl & " | send-to-omnifocus.scpt |
" & theGmailUrl | send-to-omnifocus.scpt |
set NewTask to make new inbox task with properties {name:theTask, note:theNote} | send-to-omnifocus.scpt |
select {NewTask} | send-to-omnifocus.scpt |
set message to argv as string | notification.txt |
display notification message with title "Terminal" # subtitle "test" | notification.txt |
set _windows to Finder windows | Fix%20broken%20Finder%20windows.applescript |
repeat with _window in _windows | Fix%20broken%20Finder%20windows.applescript |
tell _window | Fix%20broken%20Finder%20windows.applescript |
if its toolbar visible then | Fix%20broken%20Finder%20windows.applescript |
set _bounds to its bounds | Fix%20broken%20Finder%20windows.applescript |
set its toolbar visible to false | Fix%20broken%20Finder%20windows.applescript |
repeat while not (exists (menu item "Show Toolbar" of menu "View" of menu bar 1 of application process "Finder")) | Fix%20broken%20Finder%20windows.applescript |
click menu item "Hide Toolbar" of menu "View" of menu bar 1 of application process "Finder" | Fix%20broken%20Finder%20windows.applescript |
set _oldBounds to its bounds | Fix%20broken%20Finder%20windows.applescript |
set its toolbar visible to true | Fix%20broken%20Finder%20windows.applescript |
repeat while its bounds ≠ _oldBounds | Fix%20broken%20Finder%20windows.applescript |
set its bounds to _bounds | Fix%20broken%20Finder%20windows.applescript |
property lib : load script POSIX path of (path to scripts folder) & "lib/lib.scpt" | Search for Album Covers.applescript |
property base_url : "http://www.google.com/images?q=" | Search for Album Covers.applescript |
set _track to item 1 of selection | Search for Album Covers.applescript |
else if player state is not stopped then | Search for Album Covers.applescript |
set _track to current track | Search for Album Covers.applescript |
set _artist to artist of _track | Search for Album Covers.applescript |
if album artist of _track is not "" then set _artist to album artist of _track | Search for Album Covers.applescript |
set _url to base_url & URLEncode(_artist & " " & album of _track & " album cover") of _Text of lib as text | Search for Album Covers.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.