Guest Foster Posted July 28, 2005 Share Posted July 28, 2005 Hi, I am trying to use DllCall etc to post a message to a window to notify me when the script reaches a certain point. Using the code of the form...Local $res = DllCall("User32.dll", "long", "PostMessageA", "hwnd", $hwnd, "int", $wMsg, "int", $wParam, "int", $lParam)What I want to do is pass the hwnd in as a cmd line parameter to the script, however this doesn't work (the call doesn't fail it doesn't cause the expected outcome). As part of my testing I discovered that using WinGetHandle to retrieve the handle did work. Even tho the values of the $hwnd variable look the same (using MsgBox) either way and to compare them with == they are the same. I can't use the WinGetHandle in my final script as the details of the window may change...Any modification of the value returned by WinGetHandle using string manipulation functions will cause it to fail. So I suspect that there is some difference in the internal representation of the hwnd when obtained via WinGetHandle or via string manipulation... Hex(CmdLine[x], 8)Any comments appreciated... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now