Jump to content
Sign in to follow this  
ofLight

Help with _API_PostMessage

Recommended Posts

ofLight

Can anyone post an example use of _API_PostMessage from A3LWinAPI.au3 ?? or if not can any of you DLL masters out there point me in the right direction with useing User32.dll and PostMessageA within AutoIt? I have tried manny different combinations but am apparently just not understanding exactly what the syntax needs to be.

My clearly failed and garbald attempt

$activeWin = WinGetHandle("")
    $Result = DllCall("User32.dll", "int", "PostMessageA", "hwnd", $activeWin, "int", "test message text", "int", "", "int", "")
    MsgBox(0,"",$Result)

There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

Share this post


Link to post
Share on other sites
Zedna

Can anyone post an example use of _API_PostMessage from A3LWinAPI.au3 ?? or if not can any of you DLL masters out there point me in the right direction with useing User32.dll and PostMessageA within AutoIt? I have tried manny different combinations but am apparently just not understanding exactly what the syntax needs to be.

My clearly failed and garbald attempt

$activeWin = WinGetHandle("")
    $Result = DllCall("User32.dll", "int", "PostMessageA", "hwnd", $activeWin, "int", "test message text", "int", "", "int", "")
    MsgBox(0,"",$Result)
Instead of "test message text" must be some Windows message code, for example WM_QUIT

Search forum for DllCall & SendMessage to see how it's used.

Also

MsgBox(0,"",$Result[0])

Also say what exactly do you want to do?

Edited by Zedna

Share this post


Link to post
Share on other sites
SmOke_N

"int", "test message text"

See anything wrong there?... ie... you say you are sending an integer, yet you included a string....

Edit:

:)

See what I get for getting something to drink before I post, beat by 8 minutes!! <_<

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

×