Sign in to follow this  
Followers 0
52AT

A problem about DllCall

4 posts in this topic

I want to send a keystroke to Notepad.

This is my script:

Dim $WM_KEYDOWN = 256,  $VK_TAB = 9
$hwnd = WinGetHandle("Untitled - Notepad")
DLLCall("user32.dll","long","SendMessage", "hwnd", $hWnd, "long", $WM_KEYDOWN, "long", $VK_TAB, "long", 0)

but the code is't work.

Share this post


Link to post
Share on other sites



http://www.autoitscript.com/fileman/users/Helge/forum/forum-ss.gif

(btw, the topic will probably moved so there's no need to create a new one)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Dim $WM_KEYDOWN = 256,  $VK_TAB = 9
$hwnd = WinGetHandle("Untitled - Notepad")
DLLCall("user32.dll","long","SendMessage", "hwnd", $hWnd, "long", $WM_KEYDOWN, "long", $VK_TAB, "long", 0)

Saves a couple of minutes searching MSDN like crazy.

P.S. If you use [ autoit ] instead of [ code ] (remove the spaces) and [ /autoit ] instead of [ /code ], it makes it a bit clearer if you post complicated scripts.

P.P.S. Try the support forum as well.

Edited by Pa Callender

[size="4"]YOU SHALL NOT PARSE!![/size]

Share this post


Link to post
Share on other sites

Moving to correct forum.

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  
Followers 0