text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
tell button "Export" of sheet 1 of window 1
|
Export Calendars to ICS.applescript
|
if button "Replace" of sheet 1 of sheet 1 of window 1 exists then
|
Export Calendars to ICS.applescript
|
tell button "Replace" of sheet 1 of sheet 1 of window 1
|
Export Calendars to ICS.applescript
|
script LoopCounter
|
TimeMachineNasMount.scpt
|
property Cycles : 0
|
TimeMachineNasMount.scpt
|
to giveAttempt to user
|
TimeMachineNasMount.scpt
|
set Cycles to Cycles + 1
|
TimeMachineNasMount.scpt
|
return display dialog "Try again? " & (Cycles - 5) * -1 & " remain" -- added cycle counter
|
TimeMachineNasMount.scpt
|
end giveAttempt
|
TimeMachineNasMount.scpt
|
script HighLoopCounter
|
TimeMachineNasMount.scpt
|
property parent : LoopCounter
|
TimeMachineNasMount.scpt
|
on giveAttempt to user
|
TimeMachineNasMount.scpt
|
if my Cycles > 3 then
|
TimeMachineNasMount.scpt
|
display dialog "TimeMachine was not mounted" -- Final loop display
|
TimeMachineNasMount.scpt
|
continue giveAttempt to user -- Shows the parent dialog untill
|
TimeMachineNasMount.scpt
|
set results to boolean
|
TimeMachineNasMount.scpt
|
set desiredSSID to "DD-WRT" -- Assign the home networks SSID to compare with the current network SSID
|
TimeMachineNasMount.scpt
|
set thisSSID to do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | awk '/ SSID: / {print $2}'"
|
TimeMachineNasMount.scpt
|
get thisSSID
|
TimeMachineNasMount.scpt
|
if thisSSID is not "DD-WRT" then
|
TimeMachineNasMount.scpt
|
set results to false & (display dialog "SSID: " & thisSSID & "
|
TimeMachineNasMount.scpt
|
Unidentified network connection " & "
|
TimeMachineNasMount.scpt
|
Cancelling Process")
|
TimeMachineNasMount.scpt
|
return {results, thisSSID, desiredSSID} -- Exit process and printout results
|
TimeMachineNasMount.scpt
|
else if thisSSID is "DD-WRT" and desiredSSID is "DD-WRT" then
|
TimeMachineNasMount.scpt
|
set results to true & (display dialog "SSID: " & thisSSID & "
|
TimeMachineNasMount.scpt
|
Home Network Identified" & "
|
TimeMachineNasMount.scpt
|
Continuing Process")
|
TimeMachineNasMount.scpt
|
repeat (5) times
|
TimeMachineNasMount.scpt
|
set prompt to "Enter Password to Mount TimeMachine.sparsebundle"
|
TimeMachineNasMount.scpt
|
set buttonOption to display dialog prompt ¬
|
TimeMachineNasMount.scpt
|
buttons {"Enter", "Exit"} default button 1 ¬
|
TimeMachineNasMount.scpt
|
default answer "ADMIN1234" with hidden answer -- Input default Password with hidden input
|
TimeMachineNasMount.scpt
|
set defaultPass to text returned of buttonOption -- set variable to recall the user input
|
TimeMachineNasMount.scpt
|
if button returned of buttonOption is "Enter" and defaultPass is "ADMIN1234" or button returned of buttonOption is "Enter" and defaultPass is "Secure" then
|
TimeMachineNasMount.scpt
|
mount volume "smb://192.168.0.144/volume2" --finish ip address and NAS drive location
|
TimeMachineNasMount.scpt
|
do shell script ("hdiutil attach -mountpoint /Volumes/TimeMachine.sparsebundle/ /Volumes/location/OfImage/TimeMachine.sparsebundle")
|
TimeMachineNasMount.scpt
|
display dialog "TimeMachine Mounted"
|
TimeMachineNasMount.scpt
|
if button returned of buttonOption is "Enter" and defaultPass is not "ADMIN1234" or buttonOption is "Enter" and defaultPass is not "Secure" then
|
TimeMachineNasMount.scpt
|
tell HighLoopCounter to giveAttempt to defaultPass
|
TimeMachineNasMount.scpt
|
if button returned of buttonOption = "Exit" then
|
TimeMachineNasMount.scpt
|
set prompt to "Do you want to exit?"
|
TimeMachineNasMount.scpt
|
set buttonOptionTwo to display dialog prompt ¬
|
TimeMachineNasMount.scpt
|
buttons {"Cancel Exit", "Continue Exit"} default button 1 ¬
|
TimeMachineNasMount.scpt
|
set defaultPass to text returned of buttonOption
|
TimeMachineNasMount.scpt
|
if button returned of buttonOptionTwo is "Continue Exit" then
|
TimeMachineNasMount.scpt
|
else if button returned of buttonOptionTwo is "Cancel Exit" then
|
TimeMachineNasMount.scpt
|
return end
|
TimeMachineNasMount.scpt
|
set os_version to do shell script "sw_vers -productVersion"
|
VacuumMailDatabase.applescript
|
set mail_version to "V2"
|
VacuumMailDatabase.applescript
|
if "10.11" <= os_version then set mail_version to "V3"
|
VacuumMailDatabase.applescript
|
set sizeBefore to do shell script "ls -lnah ~/Library/Mail/" & mail_version & "/MailData | grep -E 'Envelope Index$' | awk {'print $5'}"
|
VacuumMailDatabase.applescript
|
do shell script "/usr/bin/sqlite3 ~/Library/Mail/" & mail_version & "/MailData/Envelope\\ Index vacuum"
|
VacuumMailDatabase.applescript
|
set sizeAfter to do shell script "ls -lnah ~/Library/Mail/" & mail_version & "/MailData | grep -E 'Envelope Index$' | awk {'print $5'}"
|
VacuumMailDatabase.applescript
|
display dialog ("Mail index before: " & sizeBefore & return & "Mail index after: " & sizeAfter & return & return & "Enjoy the new speed!")
|
VacuumMailDatabase.applescript
|
repeat 100 times
|
right_key_100_times_down_on_chrome_with_half_second_delay.scpt
|
key code 124
|
right_key_100_times_down_on_chrome_with_half_second_delay.scpt
|
set eventDate to short date string of todayDate as text
|
Email%20to%20Calendar.applescript
|
set eventTime to (do shell script "date +\"%l:%M %p\" | awk '{$1=$1;print}'")
|
Email%20to%20Calendar.applescript
|
display dialog "When is the Event?" default answer eventDate & " " & eventTime
|
Email%20to%20Calendar.applescript
|
set theStartDate to date (text returned of result)
|
Email%20to%20Calendar.applescript
|
display dialog "How long is the Event? (minutes)
|
Email%20to%20Calendar.applescript
|
Set to 0 for an all day event" default answer 30
|
Email%20to%20Calendar.applescript
|
set appt_length to text returned of result
|
Email%20to%20Calendar.applescript
|
if appt_length < 1 then
|
Email%20to%20Calendar.applescript
|
set appt_mins to (0)
|
Email%20to%20Calendar.applescript
|
set theEndDate to theStartDate + (appt_mins * minutes)
|
Email%20to%20Calendar.applescript
|
set allDay to true
|
Email%20to%20Calendar.applescript
|
set appt_mins to (appt_length)
|
Email%20to%20Calendar.applescript
|
set allDay to false
|
Email%20to%20Calendar.applescript
|
set theSelection to selection as list
|
Email%20to%20Calendar.applescript
|
set theMessage to item 1 of theSelection
|
Email%20to%20Calendar.applescript
|
set theSummary to theMessage's subject
|
Email%20to%20Calendar.applescript
|
set theDescription to theMessage's content
|
Email%20to%20Calendar.applescript
|
set theOrigMessageId to theMessage's message id
|
Email%20to%20Calendar.applescript
|
set theUrl to {"message:%3C" & my replaceText(theOrigMessageId, "%", "%25") & "%3E"}
|
Email%20to%20Calendar.applescript
|
set clist to name of calendars
|
Email%20to%20Calendar.applescript
|
set cname to choose from list clist with prompt "Select Calendar"
|
Email%20to%20Calendar.applescript
|
set cal to cname as text
|
Email%20to%20Calendar.applescript
|
tell calendar cal
|
Email%20to%20Calendar.applescript
|
make new event with properties {summary:theSummary, description:theDescription, url:theUrl, start date:theStartDate, end date:theEndDate, allday event:allDay}
|
Email%20to%20Calendar.applescript
|
on replaceText(subject, find, replace)
|
Email%20to%20Calendar.applescript
|
set fmt to choose from list {"bmp", "gif", "jpg", "png"} with prompt "Convert to:"
|
ConvertImages.applescript
|
if fmt is false then
|
ConvertImages.applescript
|
set destFolder to destFolder & "/" & baseName & "." & fmt
|
ConvertImages.applescript
|
set destFolder to quoted form of destFolder
|
ConvertImages.applescript
|
do shell script "sips -s format " & fmt & " " & pathFile & " --out " & destFolder
|
ConvertImages.applescript
|
display dialog "You did not select an image, or it has failed to convert!" buttons {"Ok"} with icon stop
|
ConvertImages.applescript
|
set doDel to button returned of (display dialog "Delete original?" buttons {"Keep", "Delete"} default button "Delete")
|
ConvertImages.applescript
|
if doDel is "Delete" then
|
ConvertImages.applescript
|
do shell script "rm " & pathFile
|
ConvertImages.applescript
|
else if doDel is "Keep" then
|
ConvertImages.applescript
|
on log_items(the_list)
|
ListParser.applescript
|
repeat with i from 1 to (length of the_list)
|
ListParser.applescript
|
set theItem to item i of the_list
|
ListParser.applescript
|
log theItem
|
ListParser.applescript
|
end log_items
|
ListParser.applescript
|
on index_of(array, theItem)
|
ListParser.applescript
|
repeat with i from 1 to (length of array)
|
ListParser.applescript
|
if theItem = (item i of array) then
|
ListParser.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.