Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

[Resolved] Launch external exe from GE interface


stigzler

Recommended Posts

EDIT: RESOLVED: Here

Hi folks,

Is there any way to do this? I am trying to launch a small application that takes time-lapsed photos via a webcam. I am using this:

http://code.google.com/p/chronolapse/

I want to be able to stop and start it at will from within the GE interface.

I tried setting it up as an additional program (can't remember the proper name of this - but sits in the menu with screensaver, theme picker etc)

The problem is, it robs focus from GE, as launches window on desktop.

The developer's been great - trying to get it to launch "hidden" without robbing focus, but I think this is proving a nightmare for him.

I can write 2 bat files: one to launch the app and one to kill it. However - is there any way to force gameex to maintain focus when the app is launched (killing it doesn't effect focus)

I did try /min /hide etc in the bat, but didn't stop it robbing focus.

I relaise that focus issues are probably the bain of you guys' lives!!

Thanks

:)

Link to comment
Share on other sites

What I did for this is make a shortcut icon of the exe, and place it in a special folder. For example: "PC Games". Then all my PC Games that uses exe's, etc.. I just moved all the shortcuts (*.lnk) to that folder. Point GameEx to it as an emulator path, set the rom filter to *.lnk, and off you go. You could do it other ways too. There are settings in there for External Apps, but I'm not home right now to tell you exactly where.

Link to comment
Share on other sites

Thanks Null - looks good.

Was thinking about this. If I treat launching a bat or link (which launches the exe) - is there any way to stop gameex shutting itself down and waiting for the exe to finish? Basically, all I want if for GameEx to launch (of kill) the exe as a 'background process' and carry on its business as usual (without waiting for anything to happen with/to the exe)????

Any ideas?

Link to comment
Share on other sites

Not really Tempest. I'd like the user to be able to choose when they stop and start the program - from the gameex interface.

Just tried via the additional programs menu, but minimises gameex.

basically, want to select something in gameex, which runs the program in the background... letting you continue to browse GE. And the same with stopping

Link to comment
Share on other sites

I have a "launch with gameex" program that runs the update to check for new games to add to the High Score Competition map file (DETAILS). You could probably do that with GameEx and your timelapse program; have it run your program when GameEx starts, and then have a lnk/bat or whatever available in the GameEx menu to close it down. With the launch with gameex feature, you don't have to do anything, it runs prior to gameex starting it's loadup.

Link to comment
Share on other sites

Yeah thanks Hans, I considered that. But as aforementioned - wanting the user to be able to stop and start it at will... if used that method, would have to restart GameEx every time wanted to restart the cabcam.

Hmmm... am I missing something really obvious??

Link to comment
Share on other sites

I've been thinking about this and I do think it's possible, but realize that it does run counter to what GameEx is designed to do. Have you ever read one of those threads where a user describes an issue in which they launch an emulator, and GameEx immediately takes back focus (despite the fact that the emulator is still running in the background)? That's basically what you're trying to do here ... except on purpose.

The trick isn't going to be how to start the app (I don't think), but rather how to close it. I actually think you'll need two emulator slots to accomplish this. One to open and one to close. This could be seen as being a bit wonky because the option to close the process will always display even if the process was never started in the first place (although if done properly clicking the close command should hopefully do nothing in the event that the process was never started).

Any hoo here's what I'm thinking. I think Tempest is on to something above with the use of the Launch Before command. GameEx doesn't consider the Launch Before process to be a "Watched Process" so it's not going to wait for that process to complete before returning to GameEx. The tricky part (or hackish part if you prefer) is that you do need to have a Command Line setting of some sort, but ... I think it can be a simple command that that executes instantaneously. Maybe the following would do the trick:

cd..

Executing an empty batch (.bat) script might also do it for you.

But remember that once you launch your process GameEx will not know that it's running. That's why you need a separate process to close it. Ideally your process has command line support to exit "cleanly". Maybe something along the lines of:

YourProcess.exe -exit

But if it doesn't you can always get medieval on it and use taskkill or tskill (which one to use depends on your operating system). How ever you choose to close it, in this case the command actually can be used in the normal Command Line setting since the "close" command will execute instantaneously anyway.

So that's my theory. I dunno I might be talking out my ass, but I think it could work. Moving the open and close commands into their own "spot" in the menu (via custom menus) would help to keep your menu structure a bit cleaner.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...