Jump to content

A problem about DllCall


52AT
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...