text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
keystroke "c" using command down
|
firefoxURLtoThings.applescript
|
tell application "System Events" to keystroke space using {option down, control down}
|
firefoxURLtoThings.applescript
|
set theColors to {"none", "red", "orange", "green", "blue", "purple"}
|
Set color from list.applescript
|
set newColor to choose from list theColors with title "Pick a color" default items {"none"}
|
Set color from list.applescript
|
set q color of eachCue to newColor
|
Set color from list.applescript
|
set current pane to pane "com.noodlesoft.Hazel"
|
Toggle-Hazel.applescript
|
repeat until exists of radio button 3 of radio group 1 of window 1
|
Toggle-Hazel.applescript
|
if failsafe = 100 then error "info button" number 1000
|
Toggle-Hazel.applescript
|
if value of radio button 3 of radio group 1 of window 1 = 0 then
|
Toggle-Hazel.applescript
|
click radio button 3 of radio group 1 of window 1
|
Toggle-Hazel.applescript
|
repeat until exists of (first button of group 1 of group 1 of window 1 whose name contains "Hazel")
|
Toggle-Hazel.applescript
|
if failsafe = 100 then error "Start/Stop Hazel button" number 1000
|
Toggle-Hazel.applescript
|
click (first button of group 1 of group 1 of window 1 whose name contains "Hazel")
|
Toggle-Hazel.applescript
|
if errNum = 1000 then set errMsg to "Script timeout, " & errMsg & " not found"
|
Toggle-Hazel.applescript
|
display dialog errMsg & return & return & errNum buttons {"Cancel", "OK"} default button "OK"
|
Toggle-Hazel.applescript
|
fmGUI_ManageSecurity_PrivSet_Rename({privSet_oldName:"Developer", privSet_newName:"Developer_1", fullAccessAccountName:"admin", fullAccessPassword:""})
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
on fmGUI_ManageSecurity_PrivSet_Rename(prefs)
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
if fmGUI_ManageSecurity_PrivSet_Select({privSetName:privSet_newName of prefs, fullAccessAccountName:fullAccessAccountName of prefs, fullAccessPassword:fullAccessPassword of prefs}) then return true
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
if not fmGUI_ManageSecurity_PrivSet_Select({privSetName:privSet_oldName of prefs, fullAccessAccountName:fullAccessAccountName of prefs, fullAccessPassword:fullAccessPassword of prefs}) then error "unable to select by old name" number -1024
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
fmGUI_ManageSecurity_PrivSet_OpenSelected({})
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
set value of text field "Privilege Set Name" of window 1 to privSet_newName of prefs
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
set okButton to button "OK" of window 1
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
clickObjectByCoords(okButton)
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
return windowWaitUntil({windowName:"Manage Security", whichWindow:"front", windowNameTest:"starts with"})
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
error "Couldn't fmGUI_ManageSecurity_PrivSet_Rename - " & errMsg number errNum
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
end fmGUI_ManageSecurity_PrivSet_Rename
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
on clickObjectByCoords(prefs)
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
tell application "htcLib" to clickObjectByCoords(my coerceToString(prefs))
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
end clickObjectByCoords
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
on fmGUI_ManageSecurity_PrivSet_OpenSelected(prefs)
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
tell application "htcLib" to fmGUI_ManageSecurity_PrivSet_OpenSelected(prefs)
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
end fmGUI_ManageSecurity_PrivSet_OpenSelected
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
on fmGUI_ManageSecurity_PrivSet_Select(prefs)
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
tell application "htcLib" to fmGUI_ManageSecurity_PrivSet_Select(prefs)
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
end fmGUI_ManageSecurity_PrivSet_Select
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
on coerceToString(incomingObject)
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
tell application "Finder" to set coercePath to (container of (container of (path to me)) as text) & "text parsing:coerceToString.applescript"
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
set codeCoerce to read file coercePath as text
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
tell application "htcLib" to set codeCoerce to "script codeCoerce " & return & getTextBetween({sourceText:codeCoerce, beforeText:"-- START OF CODE", afterText:"-- END OF CODE"}) & return & "end script" & return & "return codeCoerce"
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
set codeCoerce to run script codeCoerce
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
tell codeCoerce to coerceToString(incomingObject)
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
end coerceToString
|
fmGUI_ManageSecurity_PrivSet_Rename.applescript
|
set DNSinUse to do shell script "networksetup -getdnsservers Ethernet"
|
ChangeDNS.scpt
|
set question to display dialog "The current DNS server(s):" & return & DNSinUse buttons {"Set DNS", "DHCP", "Cancel"}
|
ChangeDNS.scpt
|
set answer to button returned of question
|
ChangeDNS.scpt
|
if answer is equal to "DHCP" then
|
ChangeDNS.scpt
|
do shell script "networksetup -setdnsservers Ethernet Empty"
|
ChangeDNS.scpt
|
do shell script "dscacheutil -flushcache"
|
ChangeDNS.scpt
|
if answer is equal to "Set DNS" then
|
ChangeDNS.scpt
|
set question to display dialog "Please select" buttons {"Google DNS", "OpenDNS", "Cloudflare"}
|
ChangeDNS.scpt
|
if answer is equal to "Google DNS" then
|
ChangeDNS.scpt
|
do shell script "networksetup -setdnsservers Ethernet 8.8.8.8 8.8.4.4"
|
ChangeDNS.scpt
|
if answer is equal to "OpenDNS" then
|
ChangeDNS.scpt
|
do shell script "networksetup -setdnsservers Ethernet 208.67.222.222 208.67.220.220"
|
ChangeDNS.scpt
|
if answer is equal to "Cloudflare" then
|
ChangeDNS.scpt
|
do shell script "networksetup -setdnsservers Ethernet 1.1.1.1 1.0.0.1"
|
ChangeDNS.scpt
|
set newDNS to do shell script "networksetup -getdnsservers Ethernet"
|
ChangeDNS.scpt
|
display dialog "The new DNS server(s):" & return & newDNS buttons {"OK"}
|
ChangeDNS.scpt
|
on sortEvents(myList)
|
sortEvents.applescript
|
set myNewList to {}
|
sortEvents.applescript
|
repeat until length of myList = 0
|
sortEvents.applescript
|
set leastIndex to findLeastItem(myList)
|
sortEvents.applescript
|
set end of myNewList to item leastIndex of myList
|
sortEvents.applescript
|
set myList to removeItemAtIndex(myList, leastIndex)
|
sortEvents.applescript
|
return myNewList
|
sortEvents.applescript
|
end sortEvents
|
sortEvents.applescript
|
on findLeastItem(lst)
|
sortEvents.applescript
|
set theLeast to start date of item 1 of lst
|
sortEvents.applescript
|
set theIndex to 1
|
sortEvents.applescript
|
set iterater to 1
|
sortEvents.applescript
|
repeat with i in lst
|
sortEvents.applescript
|
if start date of i ≤ theLeast then
|
sortEvents.applescript
|
set theLeast to start date of i
|
sortEvents.applescript
|
set theIndex to iterater
|
sortEvents.applescript
|
set iterater to iterater + 1
|
sortEvents.applescript
|
return theIndex
|
sortEvents.applescript
|
end findLeastItem
|
sortEvents.applescript
|
on removeItemAtIndex(lst, theIndex)
|
sortEvents.applescript
|
set theLength to length of lst
|
sortEvents.applescript
|
if theLength = 1 then
|
sortEvents.applescript
|
else if theLength = theIndex then
|
sortEvents.applescript
|
set newList to items 1 thru (theLength - 1) of lst
|
sortEvents.applescript
|
else if theIndex = 1 then
|
sortEvents.applescript
|
set newList to items 2 thru theLength of lst
|
sortEvents.applescript
|
set newList to items 1 thru (theIndex - 1) of lst & items (theIndex + 1) thru (theLength) of lst
|
sortEvents.applescript
|
end removeItemAtIndex
|
sortEvents.applescript
|
on tell_time()
|
Script 18-18.applescript
|
display dialog (time string of (current date))
|
Script 18-18.applescript
|
end tell_time
|
Script 18-18.applescript
|
if (count of selectedMessages) is equal to 0 then
|
Add Selected Messages Multiple to Things.applescript
|
display alert "No Messages Selected" message "Select the messages you want to add to Things before running this script."
|
Add Selected Messages Multiple to Things.applescript
|
set taskName to subject of eachMessage
|
Add Selected Messages Multiple to Things.applescript
|
set taskNotes to content of eachMessage
|
Add Selected Messages Multiple to Things.applescript
|
tell application "Things.app"
|
Add Selected Messages Multiple to Things.applescript
|
set newToDo to make new «class tstk» with properties {name:taskName, «class note»:taskNotes}
|
Add Selected Messages Multiple to Things.applescript
|
set «class dued» of newToDo to (current date) + 7 * days
|
Add Selected Messages Multiple to Things.applescript
|
set «class tnam» of newToDo to "from email"
|
Add Selected Messages Multiple to Things.applescript
|
set pathFile to selection as alias
|
Get Parent Folder Of Selection.applescript
|
set pathFile to quoted form of POSIX path of pathFile
|
Get Parent Folder Of Selection.applescript
|
set destFolder to do shell script "dirname " & pathFile
|
Get Parent Folder Of Selection.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.