Skip to content

Instantly share code, notes, and snippets.

@AgentOak
Last active September 11, 2019 22:07
Show Gist options
  • Save AgentOak/7260a48d06890af82d1391c5a0f9efbe to your computer and use it in GitHub Desktop.
Save AgentOak/7260a48d06890af82d1391c5a0f9efbe to your computer and use it in GitHub Desktop.
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