Skip to content

Instantly share code, notes, and snippets.

@DeathBorn
Created July 21, 2019 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeathBorn/c0b96a4cf908f039f8a85950847b879f to your computer and use it in GitHub Desktop.
Save DeathBorn/c0b96a4cf908f039f8a85950847b879f to your computer and use it in GitHub Desktop.
safari passwords to text editor
repeat 10 times
tell application "Safari"
activate
delay 0.4
tell application "System Events" to set frontApp to name of first process whose frontmost is true
tell application "System Events"
tell application process frontApp
set _selection to value of attribute "AXFocusedUIElement"
tell _selection to perform action "AXShowMenu"
tell application "System Events" to key code 125
tell application "System Events" to keystroke return
end tell
end tell
end tell
tell application "TextEdit"
activate
delay 0.4
tell application "System Events" to keystroke "v" using command down
tell application "System Events" to keystroke " |||| "
end tell
tell application "Safari"
activate
delay 0.4
tell application "System Events" to set frontApp to name of first process whose frontmost is true
tell application "System Events"
tell application process frontApp
set _selection to value of attribute "AXFocusedUIElement"
tell _selection to perform action "AXShowMenu"
tell application "System Events" to key code 125
tell application "System Events" to key code 125
tell application "System Events" to keystroke return
end tell
end tell
end tell
tell application "TextEdit"
activate
delay 0.4
tell application "System Events" to keystroke "v" using command down
tell application "System Events" to keystroke " ||||"
end tell
tell application "Safari"
activate
delay 0.4
tell application "System Events" to set frontApp to name of first process whose frontmost is true
tell application "System Events"
tell application process frontApp
set _selection to value of attribute "AXFocusedUIElement"
tell _selection to perform action "AXShowMenu"
tell application "System Events" to key code 125
tell application "System Events" to key code 125
tell application "System Events" to key code 125
tell application "System Events" to keystroke return
end tell
end tell
end tell
tell application "TextEdit"
activate
delay 0.4
tell application "System Events" to keystroke "v" using command down
tell application "System Events" to keystroke "||||"
tell application "System Events" to keystroke return
end tell
tell application "Safari"
activate
delay 0.4
tell application "System Events" to key code 125
end tell
end repeat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment