Jump to content
Sign in to follow this  
TTQ

_WinAPI_PostMessage

Recommended Posts

TTQ

I try send ctrl+z to window minimize but it not work

help me please !!!!

#include <WinAPI.au3>
#include <VirtualKey.au3>

$TITLE = WinGetTitle("[CLASS:LineKongGame]")
$hWnd = WinGetHandle($TITLE)
While 1
    _WinAPI_PostMessage($hWnd, 0x100, 0x11,0)
    _WinAPI_PostMessage($hWnd, 0x100, 0x5A,0)
    sleep(500)
WEnd

Share this post


Link to post
Share on other sites
Ascend4nt

If WinSetState() doesn't work, and Send/ControlSend don't work for you, this will send the default Windows minimize command:

; SYS_COMMAND=0x112, SC_MINIMIZE = 0xF020
    _WinAPI_PostMessage($hWnd,0x112,0xF020,0)

Share this post


Link to post
Share on other sites
TTQ

thanks Ascend4nt

but I want to know send key Ctrl + z when window minimize

I only know send aa or abc but how to keep Ctrl then press z

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.