Naufuge Posted December 30, 2005 Posted December 30, 2005 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 WEndif 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.au3Attach.wavVersion.bmp
Naufuge Posted December 30, 2005 Author Posted December 30, 2005 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.
layer Posted December 30, 2005 Posted December 30, 2005 Sorry to be off topic but is "EJR" what that "binary" spells ? (I got mixed up on the middle one "J"...) FootbaG
Naufuge Posted December 30, 2005 Author Posted December 30, 2005 Sorry to be off topic but is "EJR" what that "binary" spells ? (I got mixed up on the middle one "J"...)close, its BJR, my initials... lol
LxP Posted December 30, 2005 Posted December 30, 2005 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.
nfwu Posted December 31, 2005 Posted December 31, 2005 There is a problem... in the AutoItX there is no function for SplashImageOn(), and i don't know how to do that in C++. All the rest i can translate. TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
Naufuge Posted December 31, 2005 Author Posted December 31, 2005 i can translate some of it to C++ but what is AutoItX...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now