launching and .exe from a ZGE .exe possible?

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

launching and .exe from a ZGE .exe possible?

Post by jph_wacheski »

When we built those arcade cabinet systems for the Hand Eye Society I made a little menu system, that just took the input from the controls, (gamepad) and launched the various games,. the program keep running in the back, and when the player quit one game, they could select another.

I built that in GameMaker as it was easy to do at the time. e.i.
execute_program(prog,arg,wait) Executes program prog with arguments arg. wait indicates whether to wait for finishing.
execute_shell(prog,arg) Executes the program (or file) in the shell.
Now however, I don't even have a copy of GM on this machine, and I am not sure it would run on win7 anyway (I never got a 8.1 upgrade). I was asked to build a little menu for a similar project, just wondering if there is a simple way to launch a program from ZGE? A ZGE menu would be much more interesting,. .
iterationGAMES.com
User avatar
Kjell
Posts: 1924
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi jph,

Sure, see attached file for a simple example ( change the path to a executable that exists ). If you need any help making it work with relative paths instead of absolute, let me know.

K
Attachments
Execute.zgeproj
(713 Bytes) Downloaded 465 times
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

Excellent! Thanks so much, this will be great, I did not want to get into that old GM system again,. ZGE is way more fun.

I suspected it was possible though that external call interface,. just did not know the protocol. Thanks.
iterationGAMES.com
User avatar
Kjell
Posts: 1924
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Erm,

Should have thought about this earlier .. because the WebOpen component basically calls ShellExecute when the InBrowser property is checked, you could simply use that as well :P

Code: Select all

ZZDC<?xml version="1.0" encoding="iso-8859-1" ?>
<WebOpen Url="C:\Program.exe" InBrowser="255"/>
K
User avatar
VilleK
Site Admin
Posts: 2371
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Kjell is always full of tricks ;). Either method will work well.
Post Reply