IncredibleVolk
Technical User
I'm attempting to login to another computer remotely. Everything is working up to the Windows Login which is titled "Log On To Windows". The Windows Login Window is inside of the Remote Connection window and I can't make it the focus.
#Include "VKEYS.INC"
proc main
string sRemote
integer WinId ; Handle to window.
integer TaskId ; task id.
set aspect keys on
rxflush
pause 1
txflush
pause 1
keyflush
pause 1
winminimize $PWMAINWIN
pause 1
strfmt sRemote "C:\Windows\system32\mstsc.exe"
run sRemote TaskId
taskwin TaskId WinId ; Get window id for task.
winfocus WinId ; Set focus to window.
termmsg "%d" WinId
pause 1
sendkeystr "<IP ADDRESS>" ;Remote Login
pause 1
sendkey ALT 'N' ;Remote Connect
taskexit TaskId
pause 2
winactivate "<IP ADDRESS> - Remote Desktop"
pause 1
winfocus "<IP ADDRESS> - Remote Desktop"
pause 3
winmaximize $ACTIVEWIN ;maximize remote window
pause 1
***I CAN'T GET IT TO PLACE FOCUS***
winactivate "Log On To Windows"
winfocus "Log On to Windows"
enable WINDOW $FOCUSWIN
pause 1
sendkeystr "<PASSWORD>"
pause 3
sendvkey 13 ;ENTER KEY
endproc
#Include "VKEYS.INC"
proc main
string sRemote
integer WinId ; Handle to window.
integer TaskId ; task id.
set aspect keys on
rxflush
pause 1
txflush
pause 1
keyflush
pause 1
winminimize $PWMAINWIN
pause 1
strfmt sRemote "C:\Windows\system32\mstsc.exe"
run sRemote TaskId
taskwin TaskId WinId ; Get window id for task.
winfocus WinId ; Set focus to window.
termmsg "%d" WinId
pause 1
sendkeystr "<IP ADDRESS>" ;Remote Login
pause 1
sendkey ALT 'N' ;Remote Connect
taskexit TaskId
pause 2
winactivate "<IP ADDRESS> - Remote Desktop"
pause 1
winfocus "<IP ADDRESS> - Remote Desktop"
pause 3
winmaximize $ACTIVEWIN ;maximize remote window
pause 1
***I CAN'T GET IT TO PLACE FOCUS***
winactivate "Log On To Windows"
winfocus "Log On to Windows"
enable WINDOW $FOCUSWIN
pause 1
sendkeystr "<PASSWORD>"
pause 3
sendvkey 13 ;ENTER KEY
endproc