Jump to content

... need also help with translating VB code !


Recommended Posts

Hi,

I can't figure out how to translate this VB code into AutoIt ... :D

So, please, could somebody help me to understand what I have to do with this script below ?

Public Function MAKEINTRESOURCE(ByVal lID As Long) As String
    MAKEINTRESOURCE = "#" & CStr(MAKELONG(lID, 0))
End Function

Public Function LOWORD(ByVal dwValue As Long) As Long
    Call CopyMemory(LOWORD, dwValue, 2)
End Function

Public Function MAKELONG(ByVal wLow As Long, ByVal wHi As Long) As Long
    If (wHi And &H8000&) Then
        MAKELONG = (((wHi And &H7FFF&) * 65536) Or (wLow And &HFFFF&)) Or &H80000000
    Else
        MAKELONG = LOWORD(wLow) Or (&H10000 * LOWORD(wHi))
    End If
End Function

I need to create a MAKEINTRESOURCE Macro/Function ...

Greetz

Greenhorn

Link to comment
Share on other sites

Lokk at _WINAPI_LoWord, _WinAPI_MakeLong

MAKEINTRESOURCE:

Func MAKEINTRESOURCE($int)
If Not StringIsDigit($int) THen Return SetError(1,0,"") ; If $int has other Chars than 0-9
Return "#" & Number($int) ; Return # and delete leading zeros from $int
EndFunc

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

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