text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
end getAvailableFilename
|
New File.applescript
|
on displayAccessibilityPromptDialog()
|
New File.applescript
|
set theResponse to display dialog "Please allow the New File app in:" & return & return & "System Preferences βΆ Security & Privacy βΆ Privacy βΆ Accessibility" Β¬
|
New File.applescript
|
buttons {"Open Privacy Settings", "OK"} Β¬
|
New File.applescript
|
with icon caution Β¬
|
New File.applescript
|
if (button returned of theResponse is "Open Privacy Settings") then
|
New File.applescript
|
set the current pane to pane id "com.apple.preference.security"
|
New File.applescript
|
get the name of every anchor of pane id "com.apple.preference.security"
|
New File.applescript
|
global theHomeFolder
|
SSHKeysVia1Password.applescript
|
set theHomeFolder to POSIX path of (path to home folder)
|
SSHKeysVia1Password.applescript
|
global theSSHAddScriptPath
|
SSHKeysVia1Password.applescript
|
set theSSHAddScriptPath to (theHomeFolder & "ssh-add-pass.sh")
|
SSHKeysVia1Password.applescript
|
on PosixFileExists(thePath)
|
SSHKeysVia1Password.applescript
|
end PosixFileExists
|
SSHKeysVia1Password.applescript
|
if not PosixFileExists(theSSHAddScriptPath) then
|
SSHKeysVia1Password.applescript
|
display dialog "File '" & theSSHAddScriptPath & "' does not exist, this ain't gonna work :(" buttons {"OK"} default button 1
|
SSHKeysVia1Password.applescript
|
on Search1Password(input)
|
SSHKeysVia1Password.applescript
|
set theClipboardBackup to the clipboard
|
SSHKeysVia1Password.applescript
|
set thePassword to null
|
SSHKeysVia1Password.applescript
|
set the clipboard to null
|
SSHKeysVia1Password.applescript
|
if input contains " " then
|
SSHKeysVia1Password.applescript
|
display dialog "Input '" & input & "' contains spaces, this ain't gonna work :(" buttons {"OK"} default button 1
|
SSHKeysVia1Password.applescript
|
set theSearchTerm to input
|
SSHKeysVia1Password.applescript
|
tell application "2BUA8C4S2C.com.agilebits.onepassword-osx-helper" to open location "x-onepassword-helper://search/" & theSearchTerm
|
SSHKeysVia1Password.applescript
|
set theClipboardTextPre to the clipboard
|
SSHKeysVia1Password.applescript
|
tell application "System Events" to keystroke "c" using {shift down, command down}
|
SSHKeysVia1Password.applescript
|
set theClipboardTextPost to the clipboard
|
SSHKeysVia1Password.applescript
|
if theClipboardTextPre is not equal to theClipboardTextPost then
|
SSHKeysVia1Password.applescript
|
set thePassword to theClipboardTextPost
|
SSHKeysVia1Password.applescript
|
set the clipboard to theClipboardBackup
|
SSHKeysVia1Password.applescript
|
return thePassword
|
SSHKeysVia1Password.applescript
|
end Search1Password
|
SSHKeysVia1Password.applescript
|
on CallSSHAdd(thePath, thePassword)
|
SSHKeysVia1Password.applescript
|
set returnCode to do shell script theSSHAddScriptPath & " " & quoted form of thePath & " " & quoted form of thePassword
|
SSHKeysVia1Password.applescript
|
if returnCode as number is equal to 0 then
|
SSHKeysVia1Password.applescript
|
log "Key '" & thePath & "' added successfully."
|
SSHKeysVia1Password.applescript
|
display dialog "Error adding key '" & thePath & "' !!!"
|
SSHKeysVia1Password.applescript
|
end CallSSHAdd
|
SSHKeysVia1Password.applescript
|
on AddSSHKey(thePath, thePasswordItemName)
|
SSHKeysVia1Password.applescript
|
if not PosixFileExists(thePath) then
|
SSHKeysVia1Password.applescript
|
display dialog "File '" & thePath & "' does not exist, this ain't gonna work :(" buttons {"OK"} default button 1
|
SSHKeysVia1Password.applescript
|
set thePassword to Search1Password(thePasswordItemName)
|
SSHKeysVia1Password.applescript
|
if thePassword is not equal to null then
|
SSHKeysVia1Password.applescript
|
return CallSSHAdd(thePath, thePassword)
|
SSHKeysVia1Password.applescript
|
display dialog "Unable to find password for item '" & thePasswordItemName & "', this ain't gonna work :(" buttons {"OK"} default button 1
|
SSHKeysVia1Password.applescript
|
end AddSSHKey
|
SSHKeysVia1Password.applescript
|
AddSSHKey(theHomeFolder & ".ssh/id_rsa1", "SSH_KEY_PASSPHRASE_id_rsa1")
|
SSHKeysVia1Password.applescript
|
AddSSHKey(theHomeFolder & ".ssh/id_rsa2", "SSH_KEY_PASSPHRASE_id_rsa2")
|
SSHKeysVia1Password.applescript
|
on run arguments
|
WorldClock.applescript
|
if class of arguments is script then set arguments to {"US/Pacific", "Pacifica", "24"}
|
WorldClock.applescript
|
tell arguments
|
WorldClock.applescript
|
set theLocation to item 1
|
WorldClock.applescript
|
if theLocation does not contain "/" then return "Invalid location, Bob!"
|
WorldClock.applescript
|
set CityName to item 2
|
WorldClock.applescript
|
if (count) is 1 then
|
WorldClock.applescript
|
set CityName to theLocation
|
WorldClock.applescript
|
else if (count) is 2 then
|
WorldClock.applescript
|
set CityName to CityName as integer
|
WorldClock.applescript
|
if CityName's class is integer then set CityName to item 1 as string
|
WorldClock.applescript
|
else if (count) β₯ 3 then
|
WorldClock.applescript
|
item -1 as integer
|
WorldClock.applescript
|
set CityName to (item 2 as string) & space & (item 3 as string) as string
|
WorldClock.applescript
|
CityName as integer
|
WorldClock.applescript
|
if CityName contains "/" then
|
WorldClock.applescript
|
set CityName to text item 2 of CityName
|
WorldClock.applescript
|
set TimeFormat to item -1
|
WorldClock.applescript
|
set TimeFormat to TimeFormat as integer
|
WorldClock.applescript
|
set TimeFormat to 0
|
WorldClock.applescript
|
if TimeFormat = 12 or TimeFormat = 0 then
|
WorldClock.applescript
|
set format to "\"+%-l:%M %p\""
|
WorldClock.applescript
|
set format to "\"+%H:%M\""
|
WorldClock.applescript
|
set outTimes to {}
|
WorldClock.applescript
|
set theTime to do shell script "export TZ='" & theLocation & "'; date " & format & "; unset TZ"
|
WorldClock.applescript
|
return CityName & space & theTime
|
WorldClock.applescript
|
contents of selected tab
|
contents.applescript
|
set userColor to "green"
|
Create CLQL scene recall.applescript
|
set sceneGroupName to "Scene " & sceneNumber
|
Create CLQL scene recall.applescript
|
ο»Ώon do_something(action_name)
|
Script 19-1.applescript
|
display dialog "I'm in ur library, " & action_name & "."
|
Script 19-1.applescript
|
end do_something
|
Script 19-1.applescript
|
set appOfInterest to "blah"
|
ifApplicationExists.applescript
|
applicationExists(appOfInterest)
|
ifApplicationExists.applescript
|
on applicationExists(appOfInterest)
|
ifApplicationExists.applescript
|
do shell script "osascript -e 'exists application \"" & appOfInterest & "\"'"
|
ifApplicationExists.applescript
|
end applicationExists
|
ifApplicationExists.applescript
|
set defaultRule to "π The Black Hole - Sender"
|
Mail%20-%20Update%20Rule.applescript
|
(choose from list {"π The Black Hole - Sender", "π The Black Hole - Domain", "π Business - Sender", "π Business - Domain", "π² Finance - Sender", "π² Finance - Domain", "π Recreation - Sender", "π Recreation - Domain", "π±ββοΈ Personal - Sender", "π±ββοΈ Personal - Domain", "π Purchases - Sender", "π Purchases - Domain", "π Work - Sender", "π Work - Domain"} default items defaultRule OK button name "Select" with prompt "Select the Rule" with title "Add to Mail Rule")
|
Mail%20-%20Update%20Rule.applescript
|
if the theRule = "π The Black Hole - Sender" then
|
Mail%20-%20Update%20Rule.applescript
|
set acct to account of mailbox of item loop of theMessages
|
Mail%20-%20Update%20Rule.applescript
|
set spamAddr to extract address from sender of item loop of theMessages
|
Mail%20-%20Update%20Rule.applescript
|
set psRule to rule "π The Black Hole"
|
Mail%20-%20Update%20Rule.applescript
|
tell psRule
|
Mail%20-%20Update%20Rule.applescript
|
set expression to spamAddr
|
Mail%20-%20Update%20Rule.applescript
|
set mailbox of item loop of theMessages to mailbox "Trash" of acct
|
Mail%20-%20Update%20Rule.applescript
|
else if theRule = "π The Black Hole - Domain" then
|
Mail%20-%20Update%20Rule.applescript
|
set theDomain to text item 2 of spamAddr
|
Mail%20-%20Update%20Rule.applescript
|
else if the theRule = "π² Finance - Sender" then
|
Mail%20-%20Update%20Rule.applescript
|
set psRule to rule "π² Finance"
|
Mail%20-%20Update%20Rule.applescript
|
else if theRule = "π² Finance - Domain" then
|
Mail%20-%20Update%20Rule.applescript
|
else if theRule = "π±ββοΈ Personal - Sender" then
|
Mail%20-%20Update%20Rule.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.