Jump to content

Recommended Posts

Posted

Hi Everybody,

i have a small WinActivate script wich is doing nothing more then activate a window and send a keypress...

I noticed that this script is not working if i have my actual focus in a typing field with a blinking curor (Browser adress bar, notepad, word, chatwindow etc...)

If i change my focus to something else where i am not able to type, the script is working..

 

WinActivate("[CLASS:MyWindowClass]")
Opt("SendKeyDownDelay", 800)
Send("x")

 

Any suggestions ?

  • 3 weeks later...
Posted

Getting same behaviour. Window comes to top, but doesn't have focus. (title bar is greyed out. Keys don't get sent)
 

$hwnd1 = WinGetHandle("[ACTIVE]")
Sleep(300)
$hwnd2 = _WinAPI_GetWindow ($hwnd1, $GW_HWNDNEXT   )
Send ("SomeKeys")
Sleep(300) 
WinActivate($hwnd2)
Sleep(300)

WinWaitActive($hWnd2) reports that the window was activated.   WinSetState($hWnd2, "", @SW_SHOW)       WinSetState($hWnd2, "", @SW_RESTORE )      WinSetState($hWnd2, "", @SW_ENABLE )

Windows 8.1 . UAC disabled. Added #RequireAdmin . Using a  high contrast windows theme. Tried with multiple windows, notepad2,  autoit help file.

What else can be tried ?

 

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...