text
stringlengths
0
15.7k
source
stringlengths
6
112
if button returned of goMongo = "yes" then my mongoInstaller()
mongodb-installer.app.scpt
set dataExist to false
mongodb-installer.app.scpt
set dataDir to "data/db"
mongodb-installer.app.scpt
tell application "Finder" to if exists (dataDir) as POSIX file then set dataExist to true
mongodb-installer.app.scpt
if dataExist = true then
mongodb-installer.app.scpt
set createData to "sudo /bin/mkdir -p /data/db/ && sudo chmod 777 /data && sudo chmod 777 /data/db"
mongodb-installer.app.scpt
do shell script createData with administrator privileges
mongodb-installer.app.scpt
display notification "Script was cancelled" with title scriptName
mongodb-installer.app.scpt
display alert error_message
mongodb-installer.app.scpt
return display notification "MongoDB install completed" with title scriptName
mongodb-installer.app.scpt
on mongoInstaller()
mongodb-installer.app.scpt
set binApp to alias ((path to me as text) & "Contents:Resources:" & mongoVersion & ":bin:") as text
mongodb-installer.app.scpt
tell application "Finder" to set the binArray to list folder binApp with invisibles
mongodb-installer.app.scpt
return display alert "ERROR: " & error_message
mongodb-installer.app.scpt
repeat with theItem in binArray
mongodb-installer.app.scpt
set shellCommand to "cp " & quoted form of (POSIX path of binApp & contents of theItem) & " " & quoted form of usrBin
mongodb-installer.app.scpt
set result to do shell script shellCommand with administrator privileges
mongodb-installer.app.scpt
on error result
mongodb-installer.app.scpt
display alert result
mongodb-installer.app.scpt
end mongoInstaller
mongodb-installer.app.scpt
on mongoExistance()
mongodb-installer.app.scpt
set mongoExists to false
mongodb-installer.app.scpt
tell application "Finder" to if exists (usrBin & "mongod") as POSIX file then set mongoExists to true
mongodb-installer.app.scpt
end mongoExistance
mongodb-installer.app.scpt
set theSelection to value of attribute "AXFocusedUIElement"
Share selection to Notes.applescript
tell theSelection to perform action "AXShowMenu"
Share selection to Notes.applescript
on no_whitespace(theFolder, scriptTitle)
no-whitespace-files.scpt
set theDelimiters to AppleScript's text item delimiters
no-whitespace-files.scpt
set theseItems to items of theFolder
no-whitespace-files.scpt
repeat with thisItem in theseItems
no-whitespace-files.scpt
set thename to name of thisItem
no-whitespace-files.scpt
if thename contains " " then
no-whitespace-files.scpt
set newname to text items of thename
no-whitespace-files.scpt
set name of thisItem to (newname as string)
no-whitespace-files.scpt
set AppleScript's text item delimiters to theDelimiters
no-whitespace-files.scpt
display notification "Completed Script" with title scriptTitle
no-whitespace-files.scpt
end no_whitespace
no-whitespace-files.scpt
set scriptTitle to "No Whitespace Script"
no-whitespace-files.scpt
set theFolder to (choose folder with prompt "Please select a directory.")
no-whitespace-files.scpt
no_whitespace(theFolder, scriptTitle)
no-whitespace-files.scpt
display notification "Script was cancelled" with title scriptTitle
no-whitespace-files.scpt
display dialog error_message with title scriptTitle
no-whitespace-files.scpt
tell application "Notion"
LaunchNotion.applescript
tell process "Notion"
LaunchNotion.applescript
tell O
Finish Considered Task.applescript
set sel to selectedItems()
Finish Considered Task.applescript
clearConsider(sel)
Finish Considered Task.applescript
setComplete(sel, true)
Finish Considered Task.applescript
{"Date and Time"}
growl-time.applescript
"Growl Date and Time" all notifications allNotificationsList ¬
growl-time.applescript
icon of application "AppleScript Editor"
growl-time.applescript
set body_text to "Date and Time: "
growl-time.applescript
"Date and Time" title ¬
growl-time.applescript
body_text description ¬
growl-time.applescript
date_stamp application name "Growl Date and Time"
growl-time.applescript
set theOutput to "## " & name of theItem & return & return & note of theItem & return & "---" & return
Copy item & notes.scpt
set the clipboard to the clipboard & return & theOutput
Copy item & notes.scpt
log ("note: " & note of theItem)
Copy item & notes.scpt
do shell script "~/bin/ical-alfred events"
fetch_events.applescript
set quote to first paragraph of q
cleanKindle.applescript
set otd to AppleScript's text item delimiters
cleanKindle.applescript
set AppleScript's text item delimiters to {"(Kindle Locations ", ")"}
cleanKindle.applescript
set bits to every text item of q
cleanKindle.applescript
set pageNumber to item 3 of bits
cleanKindle.applescript
return quoted form of quote & " (" & pageNumber & ")"
cleanKindle.applescript
set AppleScript's text item delimiters to otd
cleanKindle.applescript
if (count of argv) < 3 then
pdf2acroprt.applescript
do shell script "echo " & "\"pdf2acroprt.applescript [from first page] [to last page] /path/to/input.pdf\""
pdf2acroprt.applescript
set p to item 3 of argv
pdf2acroprt.applescript
set firstPage to item 1 of argv
pdf2acroprt.applescript
set lastPage to item 2 of argv
pdf2acroprt.applescript
set pcurrentFile to do shell script "[[ \"" & p & "\" = /* ]] && echo \"" & p & "\" || echo \"$PWD/\"" & p & "\"\""
pdf2acroprt.applescript
set currentFile to POSIX file pcurrentFile as Unicode text
pdf2acroprt.applescript
set currentFileName to do shell script "basename \"" & pcurrentFile & "\""
pdf2acroprt.applescript
log "Printing " & currentFile & "... "
pdf2acroprt.applescript
open currentFile
pdf2acroprt.applescript
set activeDoc to active doc
pdf2acroprt.applescript
print pages of activeDoc first firstPage last lastPage PS Level 3 without binary output
pdf2acroprt.applescript
close activeDoc saving no
pdf2acroprt.applescript
on error errorMes
pdf2acroprt.applescript
display dialog errorMes
pdf2acroprt.applescript
set theSentDate to date sent of first item of theSelection
Copy Sent Date and Link.applescript
set theSentDateString to ((month of theSentDate as integer) & "/" & (day of theSentDate) & "/" & (year of theSentDate) & " " & (time string of theSentDate)) as string
Copy Sent Date and Link.applescript
set the clipboard to theSentDateString & tab & theLink
Copy Sent Date and Link.applescript
fmGUI_ManageSecurity_AccessScripts_GetInfo({})
fmGUI_ManageSecurity_AccessScripts_GetInfo.applescript
set privList to name of static text 3 of every row of table 1 of scroll area 1 of window 1
fmGUI_ManageSecurity_AccessScripts_GetInfo.applescript
set scriptPrivList to {}
fmGUI_ManageSecurity_AccessScripts_GetInfo.applescript
copy {scriptName:item i of nameList, scriptPriv:item i of privList} to end of scriptPrivList
fmGUI_ManageSecurity_AccessScripts_GetInfo.applescript
set scriptAccess to {allowCreate:allowCreate, scriptPrivList:scriptPrivList}
fmGUI_ManageSecurity_AccessScripts_GetInfo.applescript
return scriptAccess
fmGUI_ManageSecurity_AccessScripts_GetInfo.applescript
error "unable to fmGUI_ManageSecurity_AccessScripts_GetInfo - " & errMsg number errNum
fmGUI_ManageSecurity_AccessScripts_GetInfo.applescript
set activeDoc to active workbook
cur doc link.scpt
set activeDocName to name of active workbook
cur doc link.scpt
set activeDocPath to path of active workbook
cur doc link.scpt
set fullURL to full name of active workbook
cur doc link.scpt
tell (load script POSIX file "/Users/matt/code/chrome-window-management-scripts/Raise in Chrome Library.scpt") to raiseChromeTab("https://mail.google.com/mail/u/0/", " - Gmail", "Gmail", "ui=2")
Raise Gmail in Chrome.scpt
set windowid to 1
maximize copy.applescript
if (appname as string) is equal to "Opera" then
maximize copy.applescript
set windowid to 2
maximize copy.applescript
tell window (windowid as integer)
maximize copy.applescript