Skip to content

Instantly share code, notes, and snippets.

@heysamtexas
Created January 17, 2017 14:13
Show Gist options
  • Save heysamtexas/c597bd7040a2dd69b5452799532cf1a8 to your computer and use it in GitHub Desktop.
Save heysamtexas/c597bd7040a2dd69b5452799532cf1a8 to your computer and use it in GitHub Desktop.
Hammerspoon snippet to autologin on a simple form
--[[
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