Jump to content

I want Find software can convert function API of Visual Basic to function Dllcall of Autoit?


Recommended Posts

I see function API in VB very good, But I dont'n Know convert to Autoit?

Please Help me!

Thank much!

Give a short example of what you already have in VB that you want to implement in AutoIt.

:)

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

Usually, function API in VB:

Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long

As:

Func GetWindowClass( $hwnd )

dim $WinText

$Result = DLLCall($user32, "Int", "GetClassName", "HWnd",$hwnd, "Str", $WinText, "Int", 80)

Return $Result[2]

EndFunc

Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long

As:

Func WindowFromPoint( $x,$y )

$Result = DllCall( $user32, "hwnd", "WindowFromPoint", "int",$x,"int",$y)

$point = 0

Return $Result[0]

EndFunc

Declare Function GetParent Lib user32.dll (ByVal hwnd As Long) As Long

As:

Func GetParent($hwnd)

$Result = DllCall( $user32, "hwnd", "GetParent", "hwnd",$hwnd)

Return $Result[0]

EndFunc

I want Find software can convert function API of Visual Basic to function Dllcall of Autoit?

Can You write? Thank!

Link to comment
Share on other sites

Usually, function API in VB:

Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long

As:

Func GetWindowClass( $hwnd )

dim $WinText

$Result = DLLCall($user32, "Int", "GetClassName", "HWnd",$hwnd, "Str", $WinText, "Int", 80)

Return $Result[2]

EndFunc

The variable $user32 must resolve to the literal string "user32.dll". So you either need $user32 = "user32.dll", or you can drop the variable and just put "user32.dll" in there.

:)

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...