Created
January 17, 2017 14:13
-
-
Save heysamtexas/c597bd7040a2dd69b5452799532cf1a8 to your computer and use it in GitHub Desktop.
Hammerspoon snippet to autologin on a simple form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Author: Mark Anderson (https://github.com/undernewmanagement) | |
This is for users of hammerspoon, a neat little utility to script your OSX environment | |
This is a little snippet I use for autologin on applications that I develop. | |
I find that saving a few keystrokes here and there 100 times a day makes me a little happier. | |
]]-- | |
hyper = {"ctrl", "alt", "cmd"} | |
hs.hotkey.bind(hyper, "K", function () | |
-- you login username/email | |
hs.eventtap.keyStrokes('[email protected]') | |
-- advance focus to the next window | |
hs.eventtap.keyStroke({}, hs.keycodes.map["tab"]) | |
-- your password | |
hs.eventtap.keyStrokes('h4x0RGEtOUT') | |
hs.eventtap.keyStroke({}, hs.keycodes.map["return"]) | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment