When you register or create an account on a website, sometimes the best and most safe way to release your data into the wild is to generate an email specifically for that website. Using AutoHotkey you can press a single key on your board and let it work for you. This simple script will use the domain name as your first-half of the email address and complete the second half with your custom domain.
Autofill Email Input Field
Here check out this clip, you can see what it does in work:
- Update the msedge.exe with your appropriate browser (right click AHK in tray and Window Spy to find)
- Replace the AHK script @yourDomain.com with your actual custom email address
- Place your mouse cursor on the email input field and press hotkey, the example below is Numpad 1
- That’s it, you are good to go.
#IfWinActive, ahk_exe msedge.exe ; change this to your appropriate browser
NumpadSub::
MouseGetPos, CoordXRec, CoordYRec ; record mouse position
Send, !d^c ; select address bar + copy clipboard
URL = %clipboard%
SplitPath url, name, dir, ext, name_no_ext, drive
MouseMove, %CoordXRec%, %CoordYRec% ; return mouse to prev coords
Click ; focus input field
Send, %drive%
Send, ^{Backspace}{Backspace}^{Left}+{Home}{Del}{End} ; repeat action used to "trim" the %drive% to get just the domain name, an not http or .com or w/e
Send, @yourDomain.com ; change this to your favorite email domain
return
; https://autohotkey.com/board/topic/10046-copying-only-the-domain-name-from-the-url/
; https://www.autohotkey.com/docs/commands/SplitPath.htm
; https://autohotkey.com/board/topic/10046-copying-only-the-domain-name-from-the-url/
; https://www.autohotkey.com/docs/commands/SplitPath.htm
; https://autohotkey.com/board/topic/25492-after-movemouse-how-to-return-cursor-to-previous-location/#entry165007