fireking300 Posted June 14, 2008 Posted June 14, 2008 I want to Embed a game into my program its only a 1 part program that i have downloaded.
NELyon Posted June 14, 2008 Posted June 14, 2008 Run the EXE using Autoit, then use the SetParent DLLCall (_WinAPI_SetParent())
fireking300 Posted June 14, 2008 Author Posted June 14, 2008 Im a little noobish at autoit a little so i need a little more explaination.
NELyon Posted June 14, 2008 Posted June 14, 2008 Untested: #Include <WindowsConstants.au3> #include <WinAPI.au3> #Include <Constants.au3> $hGUI = GUICreate("Test", 500, 500) GUISetState() Run("Path to game here.exe");Change the path to your EXE Sleep(2000);Just to make sure the game is open $hHandle = WinGetHandle("TItle of game window") _WinAPI_SetWindowLong($hHandle, $GWL_STYLE, BitOr($WS_POPUP, $WS_VISIBLE)) _WinAPI_SetParent($hHandle, $hGUI) Do Sleep(200) Until GUIGetMsg() = -3
fireking300 Posted June 14, 2008 Author Posted June 14, 2008 (edited) It doesnt embed it but it runs it in the original window it runs it in. Edited June 14, 2008 by fireking300
NELyon Posted June 14, 2008 Posted June 14, 2008 Did you change the title of the window in the WinGetHandle call?
fireking300 Posted June 14, 2008 Author Posted June 14, 2008 (edited) No I didn't ill try that. I changed the title. it didnt work Edited June 14, 2008 by fireking300
dworld Posted June 20, 2008 Posted June 20, 2008 No I didn't ill try that.I changed the title. it didnt workkwarizmi posted here a nice embedding of a cmd.exe. Try it, maybe it'll help for you dworldI'm new in autoit, but I like it. My mind is open to the new things.
SadBunny Posted June 20, 2008 Posted June 20, 2008 Don't you just mean, writing a script that INCLUDES the game executable? Try looking up FileInstall() - it will put the installed file into your compiled script and unpack it to a location of your choice when you run the exe. Roses are FF0000, violets are 0000FF... All my base are belong to you.
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