text
stringlengths
0
15.7k
source
stringlengths
6
112
set theFile to "group name, group id" & return
Export group names.applescript
repeat with grp in (get groups)
Export group names.applescript
set theLine to name of grp & "|" & id of grp
Export group names.applescript
set theFile2 to (get groups)
Export group names.applescript
set theFile to theFile & return & return & theFile2
Export group names.applescript
set defName to "group_name_export_" & theDate & ".txt"
Export group names.applescript
set outputFileName to choose file name with prompt "Save address book group name export as text:" default name defName
Export group names.applescript
set theDMG to choose file with prompt "Please select javaforosx.dmg:" of type {"dmg"}
Java6forCatalina.scpt
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG & " -noverify -nobrowse"
Java6forCatalina.scpt
do shell script "pkgutil --expand /Volumes/Java\\ for\\ macOS\\ 2017-001/JavaForOSX.pkg ~/tmp"
Java6forCatalina.scpt
do shell script "hdiutil unmount /Volumes/Java\\ for\\ macOS\\ 2017-001/"
Java6forCatalina.scpt
do shell script "sed -i '' 's/return false/return true/g' ~/tmp/Distribution"
Java6forCatalina.scpt
do shell script "pkgutil --flatten ~/tmp ~/Desktop/Java.pkg"
Java6forCatalina.scpt
do shell script "rm -rf ~/tmp"
Java6forCatalina.scpt
display dialog "Modified Java.pkg saved on desktop" buttons {"Ok"}
Java6forCatalina.scpt
set lName to choose from list lName with prompt "Select List" default items {dName} without empty selection allowed
CreateNewReminder.applescript
set question to display dialog "Include Clipboard as a Note?" buttons {"Yes", "No"} default button 2
CreateNewReminder.applescript
(choose from list {"2 hours", "Tonight", "Tomorrow", "2 Days", "End of Week", "1 Week", "2 Weeks", "1 Month", "3 Months"} default items "End of Week" OK button name "Create" with prompt "Set follow-up time" with title "Create Reminder")
CreateNewReminder.applescript
tell (make new window)
New Chrome Window.applescript
close (tabs where index > (get index of current tab))
closetabstoright.scpt
on run input
Set%20track%20%23%20to%20iTunes.applescript
set tracksFolder to folder (POSIX file "/Users/<username>/Documents/tor.Downloads/Antennas To Hell")
Set%20track%20%23%20to%20iTunes.applescript
set songs to files in tracksFolder
Set%20track%20%23%20to%20iTunes.applescript
repeat with song in songs
Set%20track%20%23%20to%20iTunes.applescript
if name extension of song is "mp3" then
Set%20track%20%23%20to%20iTunes.applescript
set fileName to name of song as text
Set%20track%20%23%20to%20iTunes.applescript
set trackNum to text item 1 of fileName
Set%20track%20%23%20to%20iTunes.applescript
set trackName to text 1 thru -((length of (name extension of song as text)) + 2) of (rest of text items of fileName as text) as text
Set%20track%20%23%20to%20iTunes.applescript
set searchResult to search ¬
Set%20track%20%23%20to%20iTunes.applescript
playlist "Recently Added" for ¬
Set%20track%20%23%20to%20iTunes.applescript
trackName only names
Set%20track%20%23%20to%20iTunes.applescript
if (count of searchResult) is equal to 1 then
Set%20track%20%23%20to%20iTunes.applescript
set x to item 1 of searchResult
Set%20track%20%23%20to%20iTunes.applescript
set track number of x to trackNum
Set%20track%20%23%20to%20iTunes.applescript
repeat with x in searchResult
Set%20track%20%23%20to%20iTunes.applescript
log name of x & " - " & album of x
Set%20track%20%23%20to%20iTunes.applescript
make new contact with properties {first name:"Billy", last name:"Baxter", nickname:"Bobo", home address:{street address:"1 Apple Court", city:"Hemmingford Abbots", state:"Cambridgeshire", zip:"CB4 9HG", country:"UK"}, category:{category "Family", category "Christmas Card", category "Private"}}
Script 24-12.applescript
on open theFolder
droplet-dmg-folder.applescript
set theParent to the quoted form of POSIX path of (container of theFolder)
droplet-dmg-folder.applescript
do shell script "hdiutil create -srcfolder" & space & theParent & quoted form of theName & space & thePath & quoted form of theName & ".dmg" & thePath
droplet-dmg-folder.applescript
set wifi_menu to (first menu bar item whose description contains "Wi-Fi") of menu bar 1
switch_wifi.applescript
if flag = true then
switch_wifi.applescript
if description of wifi_menu contains "not enabled" then
switch_wifi.applescript
else if flag = false then
switch_wifi.applescript
if not (description of wifi_menu contains "not enabled") then
switch_wifi.applescript
set value_list_of_lists to string value of selection
importing table text from a spreadsheet.applescript
set value_list to item 1 of value_list_of_lists
importing table text from a spreadsheet.applescript
repeat with i from 2 to count value_list_of_lists
importing table text from a spreadsheet.applescript
set value_list to value_list & item i of value_list_of_lists
importing table text from a spreadsheet.applescript
set contents of selection to value_list
importing table text from a spreadsheet.applescript
tell application "System Events" to set current_user to name of current user
get_frontmost_finder_path.applescript
set AppleScript's text item delimiters to "/Users/" & current_user
get_frontmost_finder_path.applescript
return "~" & text item 2 of POSIX path of (target of front Finder window as text)
get_frontmost_finder_path.applescript
return POSIX path of (target of front Finder window as text)
get_frontmost_finder_path.applescript
to join(theList, delimiter)
LIB_Lists.applescript
set theResult to theList as text
LIB_Lists.applescript
to filterList(listToFilter, valuesToOmit)
LIB_Lists.applescript
repeat with i in listToFilter
LIB_Lists.applescript
if valuesToOmit does not contain i then set end of myResult to i as text
LIB_Lists.applescript
end filterList
LIB_Lists.applescript
on filter(L, crit)
LIB_Lists.applescript
script filterer
LIB_Lists.applescript
property criterion : crit
LIB_Lists.applescript
on filter(L)
LIB_Lists.applescript
if criterion(item 1 of L) then
LIB_Lists.applescript
return {item 1 of L} & filter(rest of L)
LIB_Lists.applescript
return filter(rest of L)
LIB_Lists.applescript
return filterer's filter(L)
LIB_Lists.applescript
on isNumber(x)
LIB_Lists.applescript
return ({class of x} is in {real, integer, number})
LIB_Lists.applescript
filter({"hey", 1, "ho", 2, 3}, isNumber)
LIB_Lists.applescript
to fileListToText(theList, addStartupDrive)
LIB_Lists.applescript
set hdName to get name of startup disk
LIB_Lists.applescript
repeat with i in theList
LIB_Lists.applescript
set myPath to POSIX path of (i as alias)
LIB_Lists.applescript
if addStartupDrive is true then set myPath to hdName & (myPath as text)
LIB_Lists.applescript
set theText to theText & myPath & return
LIB_Lists.applescript
return trimLinesRight(theText)
LIB_Lists.applescript
end fileListToText
LIB_Lists.applescript
to uniqueValues(listToFilter)
LIB_Lists.applescript
if myResult does not contain i then set end of myResult to i as text
LIB_Lists.applescript
end uniqueValues
LIB_Lists.applescript
property surroundEmptyLines : false
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
property lineEnding : linefeed
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
property indentStr : ""
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
property beginSelection : ""
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
property endSelection : ""
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
tell application "BBEdit" to if not (exists front document) then return
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
set defaultTagStr to do shell script "defaults read de.tekl.bbedit.surroundLinesWithTags tagString || echo '<ul>'"
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
set defaultButton to do shell script "defaults read de.tekl.bbedit.surroundLinesWithTags defaultButton || echo 'Surround Lines with Tags'"
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
set {theButton, tagStr} to (display dialog "Enter the HTML Tag that should surround the lines of the selection." & linefeed & linefeed & "Use <ol>/<ul> to create complete lists. This command also supports some Markdown syntax for links, images, lists and headlines:" & linefeed & linefeed & "Line = URL: [() • []() •...
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
do shell script "defaults write de.tekl.bbedit.surroundLinesWithTags tagString -string " & quoted form of tagStr
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
do shell script "defaults write de.tekl.bbedit.surroundLinesWithTags defaultButton -string " & quoted form of theButton
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
set tagStr to my regexReplace(tagStr, "/^\\s*<?\\/?(.*)>$/g", "$1")
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
set tagStrAsNumber to false
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
set tagStrAsNumber to my regexReplace(tagStr, "/[^0-9]/g", "") as integer
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
if line breaks is "Unix" then set lineEnding to linefeed
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
if line breaks is "Mac" then set lineEnding to return
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
if line breaks is "DOS" then set lineEnding to return & linefeed
Surround%20Lines%20with%20Tags%E2%80%A6.applescript
if tagStr is in {"ol", "ul", "menu"} then
Surround%20Lines%20with%20Tags%E2%80%A6.applescript