Jump to content

visual basis to autoit


Recommended Posts

How should i translate the following to autoit?

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _

(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _

(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _

lParam As Any) As Long

"You cannot solve a problem with the mind that created it" (Albert Einstein)

Link to comment
Share on other sites

@steven

As far as I see this these functions get a windows by Classname or Window name.

So there may not be a need to translate this from VB to AU3 since these functions are available natively.

See help file for ControlGetHandle

You can look up by classname using the Opt("WinTitleMatchMode", 4)

Example :

Opt("WinTitleMatchMode", 4)
...
$handle = ControlGetHandle("classname=TsShellWinClass", "DsCrowColumn", "TsWinClass10")
Or look for WinGetHandle

And for SendMessage see help file look for "_SendMessage"

This translates the DLLCall you are refering to.

I hope this helps out.

regards

ptrex

Edited by ptrex
Link to comment
Share on other sites

So there may not be a need to translate this from VB to AU3 since these functions are available natively.

ptrex

Good point. Look at _SendMessage() in the help file:

_SendMessage

--------------------------------------------------------------------------------

Wrapper for commonly used Dll Call

#Include <misc.au3>

_SendMessage ( hWnd, msg [, wParam = 0 [, lParam = 0 [, return = 0 [, wParam Type = "int" [, lParam Type = "int" ]]]]] )

:)
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...