52AT Posted October 18, 2006 Posted October 18, 2006 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.
Helge Posted October 18, 2006 Posted October 18, 2006 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)
Pa Callender Posted October 18, 2006 Posted October 18, 2006 (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 October 18, 2006 by Pa Callender [size="4"]YOU SHALL NOT PARSE!![/size]
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