FastLearner
Technical User
Winfocus is supposed to change the active window for keyboard input, but it does not seem to be accomplishing that task. See code below...
This code should check for focus every 10 seconds and if Procomm doesn't have it, it should take it.
Run this and while running, click on another app. According to what Procomm can see, it IS changing the focus, but that doesn't mean it's on top?!? Anyone know how to solve this? We can't do much window navigation at all if this command doesn't work.
This code should check for focus every 10 seconds and if Procomm doesn't have it, it should take it.
Run this and while running, click on another app. According to what Procomm can see, it IS changing the focus, but that doesn't mean it's on top?!? Anyone know how to solve this? We can't do much window navigation at all if this command doesn't work.
Code:
proc main
while 1 ;loop indefinitely for test
pause 10 ;wait 10 seconds
if $FOCUSWIN != $PWMAINWIN ;check if PW has focus
winfocus $PWMAINWIN ;if not, give it focus
if $FOCUSWIN != $PWMAINWIN
usermsg "The focus change failed. I don't know why...."
else
usermsg "Focus change was successful! Or was it?"
endif
endif
endwhile
endproc