Jump to content

Recommended Posts

Posted

can anyone who is experienced with autoit and c++, convert this code from autoit to c++?

opt("TrayIconHide", 1)

$WINDOW_NAME = "Diablo II"
$SPLASH_TITLE = "Image_Version"
$SPLASH_IMAGE = "Version.bmp"
$SPLASH_WIDTH = 160
$SPLASH_HEIGHT = 20

If Not WinExists($WINDOW_NAME) Then
    SplashOff()
    Exit
Else
    SoundPlay(@ScriptDir & "\Attach.wav")
    $IMAGE_SPLASH = WinGetPos($WINDOW_NAME)
    SplashImageOn($SPLASH_TITLE, $SPLASH_IMAGE, $SPLASH_WIDTH, $SPLASH_HEIGHT , ($IMAGE_SPLASH[2] - $SPLASH_WIDTH) / 2 + $IMAGE_SPLASH[0], $IMAGE_SPLASH[1]+ ($SPLASH_HEIGHT * 1.45), 1)
EndIf
While 1
    $IMAGE_SPLASH2 = WinGetPos($WINDOW_NAME)
    If Not WinExists($WINDOW_NAME) Then
        SplashOff()
        Exit
    Else
        If $IMAGE_SPLASH[0] = $IMAGE_SPLASH2[0] Then
        Else
            $IMAGE_SPLASH = WinGetPos($WINDOW_NAME)
            SplashImageOn($SPLASH_TITLE, $SPLASH_IMAGE, $SPLASH_WIDTH, $SPLASH_HEIGHT , ($IMAGE_SPLASH[2] - $SPLASH_WIDTH) / 2 + $IMAGE_SPLASH[0], $IMAGE_SPLASH[1]+ ($SPLASH_HEIGHT * 1.45), 1)
        EndIf
        
        If $IMAGE_SPLASH[1] = $IMAGE_SPLASH2[1] Then
        Else
            $IMAGE_SPLASH = WinGetPos($WINDOW_NAME)
            SplashImageOn($SPLASH_TITLE, $SPLASH_IMAGE, $SPLASH_WIDTH, $SPLASH_HEIGHT , ($IMAGE_SPLASH[2] - $SPLASH_WIDTH) / 2 + $IMAGE_SPLASH[0], $IMAGE_SPLASH[1]+ ($SPLASH_HEIGHT * 1.45), 1)
        EndIf
    EndIf
WEnd

if you want to test it, you need these three files, you diablo ii has to be run first with -w.

if you need help testing, PM me. ill do my best to help. Thank you.

d2.Screenhook.au3

Attach.wav

Version.bmp

Posted

because the actual program im making will be C++ and its easier to have that be part of the source code instead of running it as an external program.

Posted

Sorry to be off topic but is "EJR" what that "binary" spells ? :P (I got mixed up on the middle one "J"...)

FootbaG
Posted

Sorry to be off topic but is "EJR" what that "binary" spells ? :P (I got mixed up on the middle one "J"...)

close, its BJR, my initials... lol

Posted

That makes sense. I asked because I may have been able to help you with another language if you didn't really have just one in mind.

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
  • Recently Browsing   0 members

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