text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set text4clipboard to text4clipboard & newLine & "- " & useBrackets & mytitle -- add the titles of new items on new rows | Copy%20as%20Markdown.applescript |
set allAss to assignments of act | Copy%20as%20Markdown.applescript |
repeat with a in allAss | Copy%20as%20Markdown.applescript |
set nextResource to my findAndReplaceInText(title of resource of a, " ", mySeparator) | Copy%20as%20Markdown.applescript |
set text4clipboard to text4clipboard & " " & "@" & nextResource | Copy%20as%20Markdown.applescript |
set allTags to tags of act | Copy%20as%20Markdown.applescript |
repeat with t in allTags | Copy%20as%20Markdown.applescript |
set nextTag to my findAndReplaceInText(title of t, " ", mySeparator) | Copy%20as%20Markdown.applescript |
set text4clipboard to text4clipboard & " " & "#" & nextTag | Copy%20as%20Markdown.applescript |
set the clipboard to text4clipboard | Copy%20as%20Markdown.applescript |
long user name of (get system info) | long user name of (get system info).applescript |
set application_name to "Amazon Music" | AmazonMusicNext.applescript |
set front_app to name of first application process whose frontmost is true | AmazonMusicNext.applescript |
activate application application_name | AmazonMusicNext.applescript |
activate application front_app | AmazonMusicNext.applescript |
if (1 is in {1,2,3}) then return true | if.applescript |
set numberToAdd to missing value | Play Count Adder.applescript |
set mssgText to "Add how many plays to the selected tracks?" | Play Count Adder.applescript |
repeat while numberToAdd is missing value | Play Count Adder.applescript |
set {text_returned, button_returned} to {text returned, button returned} of (display dialog mssgText default answer "0" buttons {"Add", "Cancel"} default button 1) | Play Count Adder.applescript |
set numberToAdd to text_returned as integer | Play Count Adder.applescript |
set mssgText to "Please try again, I didn't understand that.\n\nAdd how many plays to the selected tracks?" | Play Count Adder.applescript |
if button_returned is "Add" then | Play Count Adder.applescript |
tell anTrack | Play Count Adder.applescript |
set oldCount to played count | Play Count Adder.applescript |
set played count to oldCount + numberToAdd | Play Count Adder.applescript |
on lastOffset(the_text, char) | screencapture copy.applescript |
set last_occurrence to 0 | screencapture copy.applescript |
repeat count of the_text times | screencapture copy.applescript |
if item i of the_text as string = char then | screencapture copy.applescript |
set last_occurrence to i | screencapture copy.applescript |
end lastOffset | screencapture copy.applescript |
on basedir(the_path) | screencapture copy.applescript |
set last_occurrence to lastOffset(the_path, "/") | screencapture copy.applescript |
return items 1 thru (last_occurrence) of the_path as string | screencapture copy.applescript |
end basedir | screencapture copy.applescript |
on basename(the_path) | screencapture copy.applescript |
return basename(the_path) | screencapture copy.applescript |
return items (last_occurrence + 1) thru -1 of the_path as string | screencapture copy.applescript |
set savebasedir to my basedir(savepath) | screencapture copy.applescript |
set savebasename to my basename(savepath) | screencapture copy.applescript |
keystroke "G" using {command down} -- go to | screencapture copy.applescript |
keystroke savebasedir | screencapture copy.applescript |
keystroke savebasename | screencapture copy.applescript |
set theEmailAddresses to properties of emails of person i | update-gopivotal-com-email-addresses.scpt |
repeat with j from 1 to (count of theEmailAddresses) | update-gopivotal-com-email-addresses.scpt |
if value of item j of theEmailAddresses contains "@gopivotal.com" then | update-gopivotal-com-email-addresses.scpt |
set oldAddress to value of item j of theEmailAddresses | update-gopivotal-com-email-addresses.scpt |
set AppleScript's text item delimiters to {"@"} | update-gopivotal-com-email-addresses.scpt |
set firstBit to first text item of oldAddress | update-gopivotal-com-email-addresses.scpt |
set newAddress to firstBit & "@pivotal.io" | update-gopivotal-com-email-addresses.scpt |
set value of item j of emails of person i to newAddress | update-gopivotal-com-email-addresses.scpt |
if value of item j of theEmailAddresses contains "@pivotallabs.com" then | update-gopivotal-com-email-addresses.scpt |
set str1 to "I am a string" | NSString%20to%20String.applescript |
set theString to current application's NSString's stringWithString:str1 | NSString%20to%20String.applescript |
set adjustedString to uppercaseString() of theString | NSString%20to%20String.applescript |
set newString to (adjustedString as text) | NSString%20to%20String.applescript |
return newString -- returns "I AM A STRING" | NSString%20to%20String.applescript |
set x to value of button 3 of toolbar 4 of window 1 -- copy start TC of selection | method_test.applescript |
set y to value of button 4 of toolbar 4 of window 1 -- copy end TC of selection | method_test.applescript |
key code 39 -- ' quote | method_test.applescript |
if value of button 4 of toolbar 4 of window 1 > y then | method_test.applescript |
set invertTrackNumbers to 0 -- default to not invert the track numbers | song_metadata_from_name.scpt |
set theAlbum to "Slow Horses- Season 1 (ATV+ Original Series Soundtrack)" | song_metadata_from_name.scpt |
set theArtist to "Daniel Pemberton" | song_metadata_from_name.scpt |
set theTrackCount to 27 | song_metadata_from_name.scpt |
set theGenre to "Soundtrack" | song_metadata_from_name.scpt |
set theTrackNumPos to 2 | song_metadata_from_name.scpt |
set theTrackNamePos to 3 | song_metadata_from_name.scpt |
set invertTrackNumbers to 1 | song_metadata_from_name.scpt |
set albumName to origTrackName | song_metadata_from_name.scpt |
set trackNum to (item theTrackNumPos of delimitedList as number) | song_metadata_from_name.scpt |
set trackName to item theTrackNamePos of delimitedList | song_metadata_from_name.scpt |
display dialog (delimitedList as string) -- quick error check | song_metadata_from_name.scpt |
set comment to origTrackName -- backup the original name in the comments | song_metadata_from_name.scpt |
set album to theAlbum | song_metadata_from_name.scpt |
set artist to theArtist | song_metadata_from_name.scpt |
set track number to trackNum | song_metadata_from_name.scpt |
if invertTrackNumbers is 1 | song_metadata_from_name.scpt |
set track number to (theTrackCount - trackNum +1) | song_metadata_from_name.scpt |
set track count to theTrackCount | song_metadata_from_name.scpt |
set genre to theGenre | song_metadata_from_name.scpt |
set name to trackName | song_metadata_from_name.scpt |
fmGUI_CustomFunctions_ParamsForFunction({functionName:"_Access_canView"}) | fmGUI_CustomFunctions_ParamsForFunction.applescript |
on fmGUI_CustomFunctions_ParamsForFunction(prefs) | fmGUI_CustomFunctions_ParamsForFunction.applescript |
set rawParams to value of static text 2 of (first row of table 1 of scroll area 1 of window 1 whose (value of static text 1) is functionName of prefs) | fmGUI_CustomFunctions_ParamsForFunction.applescript |
set parsedParams to parseChars({rawParams, " ; "}) | fmGUI_CustomFunctions_ParamsForFunction.applescript |
return parsedParams | fmGUI_CustomFunctions_ParamsForFunction.applescript |
error "Couldn't get custom function parameters - " & errMsg number errNum | fmGUI_CustomFunctions_ParamsForFunction.applescript |
end fmGUI_CustomFunctions_ParamsForFunction | fmGUI_CustomFunctions_ParamsForFunction.applescript |
tell application (path to frontmost application as Unicode text) to tell first window to set zoomed to not zoomed | Zoom Window.applescript |
set examplePath to (path to preferences folder from user domain as text) & "com.apple.Finder.plist" | calculate_checksum.applescript |
log md5(examplePath) | calculate_checksum.applescript |
log sha1(examplePath) | calculate_checksum.applescript |
log sha256(examplePath) | calculate_checksum.applescript |
log sha512(examplePath) | calculate_checksum.applescript |
on md5(aPath) | calculate_checksum.applescript |
return last word of (do shell script "/sbin/md5 " & quoted form of (POSIX path of aPath)) | calculate_checksum.applescript |
end md5 | calculate_checksum.applescript |
on sha1(aPath) | calculate_checksum.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.