Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

running files (executables mainly) in game...

is there any way to run a .exe file, or a shortcut or any file through scripts (event he call script function)?

i know there must be a way because aveyond did it...
 
well i tried that but now the original game - the one i opened the exe through - wont exit (even if i put $scene = nil before and after the exec)
is there any way of doing this as i dont want people who are gonna be running a whole new game through the first one to have to put up with the original file being open the whole time... using .exe files is new to me so sorry for being so noobish... you dont really need to use them much in games do you lol...
 
This should work:
Code:
Thread.start{system(exe_path, argument)}

just replace exe_path with the path of the executable, for example: "C:\Program Files\Internet Explorer\iexplorer.exe"
and replace argument with any arguments that are supposed to be passed to the exe. This is what I use to open webpages from rmxp in the default web browser, and when I close the browser, it does not close the game.
 
dont worry if you read this... heres the way to close the previous program after opening a new one:
Thread.start{system("Games/1/Game.exe","" )}
exit

thats works in normal scripting... a bit of work will need to be done to get it to work any other way (call script)...

mods / admins can close this topic now and thanks to all those who helped me out... now my other problem :D
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top