Last active
December 21, 2020 16:47
-
-
Save elpatron68/c8c2a12e3899e6a8b099e683e9c37ea1 to your computer and use it in GitHub Desktop.
Automatic log in for MeshCentral Router
This file contains 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
Opt("WinTitleMatchMode", 3) | |
While 1 | |
Login() | |
Sleep(50) | |
WEnd | |
Func Login() | |
If WinActive(" MeshCentral Router", "") Then | |
; Get the window handle | |
Local $hWnd = WinWait(" MeshCentral Router", "", 1) | |
; Set focus to the password field | |
ControlFocus($hWnd, "", "WindowsForms10.EDIT.app.0.141b42a_r6_ad11") | |
; Delete former content | |
Send("+{HOME}") | |
Send("{BACKSPACE}") | |
Sleep(20) | |
; Send password | |
Send("SECRETPASSWORD") | |
; Login | |
Send("{TAB}{ENTER}") | |
Sleep(1000) | |
EndIf | |
EndFunc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment