Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AutoHotKey script for writing long passwords into VNCviewers with broken paste
#NoEnv
#NoTrayIcon
SendMode Input
SetBatchLines -1
; Ask for username and password
InputBox, username, VNCViewer Login, Username, , , , , , , , root
if Errorlevel ; User cancelled
ExitApp
InputBox, password, VNCViewer Login, Password, HIDE
if ErrorLevel ; User cancelled
ExitApp
MsgBox, 1, VNCViewer Login, After pressing OK, you will have 3 seconds`nto click inside the applet to give it focus.`n`nCancel will exit the program.
IfMsgBox, Cancel
ExitApp
Sleep, 3000
; Send username and password
SendRaw, %username%
Send, {ENTER}
Sleep, 3000
SendRaw, %password%
Send, {ENTER}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment