text
stringlengths
0
15.7k
source
stringlengths
6
112
set thesstosend to tempfolder & the_named_file
screen-shot-script.scpt
set thesstosend to "'" & "@" & thesstosend & "'"
screen-shot-script.scpt
set url_named_file to strSerialNumber & ".webloc"
screen-shot-script.scpt
do shell script "touch " & tempfolder & url_named_file
screen-shot-script.scpt
set webloc_file to (tempfolder) & url_named_file
screen-shot-script.scpt
set logFile to open for access webloc_file with write permission
screen-shot-script.scpt
write webloc_contents to logFile
screen-shot-script.scpt
close access logFile
screen-shot-script.scpt
set webloc_file to "'" & "@" & webloc_file & "'"
screen-shot-script.scpt
set slash to "\\"
screen-shot-script.scpt
set shell_upload to "curl -X POST https://content.dropboxapi.com/2/files/upload " & slash & "
screen-shot-script.scpt
set shell_webloc_upload to "curl -X POST https://content.dropboxapi.com/2/files/upload " & slash & "
screen-shot-script.scpt
do shell script shell_upload
screen-shot-script.scpt
do shell script shell_webloc_upload
screen-shot-script.scpt
on error ErrorMsg number ErrorNum
screen-shot-script.scpt
my DisplayErrorMsg(ErrorMsg, ErrorNum)
screen-shot-script.scpt
set message_named_file to strDate & "-" & strSerialNumber & "_message.txt"
screen-shot-script.scpt
display dialog "The screen shot was captured and sent. Did you want to send a short message too?" buttons {"Yes", "No"}
screen-shot-script.scpt
if the button returned of the result is "Yes" then
screen-shot-script.scpt
display dialog "What's your message?" & return & "Think Twitter length message, short and sweet." default answer ""
screen-shot-script.scpt
set the the_message to the text returned of the result
screen-shot-script.scpt
do shell script "touch " & tempfolder & message_named_file
screen-shot-script.scpt
set message_file to (tempfolder) & message_named_file
screen-shot-script.scpt
set logFile to open for access message_file with write permission
screen-shot-script.scpt
write the_message to logFile
screen-shot-script.scpt
set message_file to "'" & "@" & message_file & "'"
screen-shot-script.scpt
set shell_message_upload to "curl -X POST https://content.dropboxapi.com/2/files/upload " & slash & "
screen-shot-script.scpt
do shell script shell_message_upload
screen-shot-script.scpt
on DisplayErrorMsg(ErrorMsg, ErrorNum)
screen-shot-script.scpt
set Msg to "Sorry, an error occured:" & return & return & ErrorMsg & " (" & ErrorNum & ")"
screen-shot-script.scpt
display dialog Msg buttons {"OK"} default button 1 with icon stop with title MyTitle
screen-shot-script.scpt
end DisplayErrorMsg
screen-shot-script.scpt
tell application "System Events" to set volume input volume 0
MuteInternalMic.applescript
set runningSP to (get running of application "System Preferences")
toggle-mirror-display.applescript
if not runningSP then
toggle-mirror-display.applescript
set the current pane to pane id "com.apple.preference.displays"
toggle-mirror-display.applescript
reveal anchor "displaysArrangementTab" of pane id "com.apple.preference.displays"
toggle-mirror-display.applescript
set prevCheckBoxStatus to true
toggle-mirror-display.applescript
repeat until tab group 1 of window 1 exists
toggle-mirror-display.applescript
set _windows to get the name of every window of application "System Preferences"
toggle-mirror-display.applescript
local mdCheckBox, checkBoxWindow
toggle-mirror-display.applescript
set mdCheckBox to false
toggle-mirror-display.applescript
repeat until mdCheckBox
toggle-mirror-display.applescript
set mdCheckBox to checkbox "Mirror Displays" of tab group 1 of window _window
toggle-mirror-display.applescript
set checkBoxWindow to _window
toggle-mirror-display.applescript
log "No checkbox in " & _window
toggle-mirror-display.applescript
tell mdCheckBox
toggle-mirror-display.applescript
set prevCheckBoxStatus to value of mdCheckBox as boolean
toggle-mirror-display.applescript
click mdCheckBox
toggle-mirror-display.applescript
repeat until tab group 1 of window "Built-in Display" exists
toggle-mirror-display.applescript
if prevCheckBoxStatus is false then
toggle-mirror-display.applescript
click pop up button of tab group 1 of window "Built-in Display"
toggle-mirror-display.applescript
repeat until menu item "Built-in Display" of menu 1 of pop up button "Optimize for:" of tab group 1 of window "Built-in Display" exists
toggle-mirror-display.applescript
click menu item "Built-in Display" of menu 1 of pop up button "Optimize for:" of tab group 1 of window "Built-in Display"
toggle-mirror-display.applescript
click menu item 3 of menu 1 of menu bar item 4 of menu bar 1 of process "System Preferences"
toggle-mirror-display.applescript
set _path to (path of shared documents folder) as string
Shared Documents.applescript
set apacheRunning to my ProcessRunning("httpd")
gistfile1 copy 7.applescript
set mysqlRunning to my ProcessRunning("mysqld")
gistfile1 copy 7.applescript
if (not apacheRunning and not mysqlRunning) then
gistfile1 copy 7.applescript
set theUserName to do shell script ("security find-generic-password -l \"MAMP\" | grep \"acct\" | cut -c 19-99 | tr -d '\"'")
gistfile1 copy 7.applescript
set thePassword to do shell script ("security 2>&1 >/dev/null find-generic-password -gl \"MAMP\" | cut -c 11-99 | tr -d '\"'")
gistfile1 copy 7.applescript
do shell script "/Applications/MAMP/bin/startApache.sh &" password thePassword user name theUserName with administrator privileges
gistfile1 copy 7.applescript
do shell script "/Applications/MAMP/bin/startMysql.sh > /dev/null 2>&1"
gistfile1 copy 7.applescript
tell application "MAMP"
gistfile1 copy 7.applescript
tell application "System Events" to set visible of process "MAMP" to false
gistfile1 copy 7.applescript
if (apacheRunning and mysqlRunning) then
gistfile1 copy 7.applescript
set theMessage to "Both Apache and MySQL servers are"
gistfile1 copy 7.applescript
else if apacheRunning then
gistfile1 copy 7.applescript
set theMessage to "The Apache server is"
gistfile1 copy 7.applescript
else if mysqlRunning then
gistfile1 copy 7.applescript
set theMessage to "The MySQL server is"
gistfile1 copy 7.applescript
display alert "Local Server Environment" message theMessage & " already running." & return & return buttons {"OK"} default button 1 giving up after 50 as critical
gistfile1 copy 7.applescript
on ProcessRunning(processName)
gistfile1 copy 7.applescript
set AppleScript's text item delimiters to "\\|"
gistfile1 copy 7.applescript
set theExpression to processName as string
gistfile1 copy 7.applescript
set isRunning to every paragraph of (do shell script "ps -acwx -o command | grep -ix " & quoted form of theExpression & " || echo 'false'")
gistfile1 copy 7.applescript
if isRunning contains "false" then
gistfile1 copy 7.applescript
end ProcessRunning
gistfile1 copy 7.applescript
return run script (POSIX file "/Users/IceHe/Documents/AppleScript/Lib/startup_tasks.applescript")
Startup_Tasks.applescript
set thisCaseId to "emoji-spotCheck"
emoji.applescript
logger's infof("Work: {}", my WORK)
emoji.applescript
logger's infof("Faucet: {}", my FAUCET)
emoji.applescript
property work : missing value
emoji.applescript
property TUBE : missing value
emoji.applescript
property WEB : missing value
emoji.applescript
property GUARD : missing value
emoji.applescript
property QA : missing value
emoji.applescript
property BOT : missing value
emoji.applescript
property CLOCK : missing value
emoji.applescript
property CHECK : missing value
emoji.applescript
property DASH : missing value
emoji.applescript
property HORN : missing value
emoji.applescript
property RED_Q : missing value
emoji.applescript
property NOTE_BLACK : missing value
emoji.applescript
property NOTE_YELLOW : missing value
emoji.applescript
property CHECKBOX : missing value
emoji.applescript
property ANT : missing value
emoji.applescript
property INFO : missing value
emoji.applescript
property PENCIL_FLAT : missing value
emoji.applescript
property PENCIL_DOWN : missing value
emoji.applescript