AutoDave Posted March 18, 2006 Share Posted March 18, 2006 Hi Experts, Let's say I code the following [here some code to start Internet explorer with a site and place the cursor into an input field] Send ("abcdefghij") [here some code to get the handle for Internet explorer] DllCall("user32.dll", "int", "PostMessage", "hwnd", -->Handle for IE <---, "int", $WM_KEYDOWN, "int", $VK_RETURN, "long",0) I noticed that PostMessage sends the RETURN KEY, before Send ("abcdefghij") is finished printing. For instance even though only "abcd" is visible/printed, the RETURN key is sent already (and cuts off the rest of the string). If I insert a sleep (500) between Send and PostMessage the whole abcdefghij string is printed. What is the technical explanation for this? PS I know of course that Send ("abcdefghij{ENTER}") would be better and simpler :-) KeeForm Link to comment Share on other sites More sharing options...
greenmachine Posted March 18, 2006 Share Posted March 18, 2006 Not sure how to answer your problem directly, but I will suggest using IE.au3.http://www.autoitscript.com/forum/index.php?showtopic=13398 Link to comment Share on other sites More sharing options...
AutoDave Posted March 18, 2006 Author Share Posted March 18, 2006 Thanks for your reply. Just to clarify. The question is not how to automate IE or how to use COM and so on. I am just wondering, why "PostMessage" sends characters, before "Send" is even finished. I thought that PostMessage and Send would send Characters into the same queue (using FIFO), but apparently not. Cheers, Dave KeeForm 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