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. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

Ok, I'm caving and asking for help on this one. I have worked on it for a week. I am calling a web browser for many web sites, video and otherwise, Netflix, hula, adult swim, wunderground, etc.

I want to call it via a bat so if I alter flags, or the browser, etc, I need only mod it in one place. I call the .cmd and pass it the site from the gameex config.

My trouble is exiting. I am using the map keys option in the external app config to pick up the Esc key and kill the process, which is the bat file GameEx creates to run the my cmd. I have found no way to run any commands on the mapped esc. Run after executes right after my cmd is spawned. If I call my cmd with a wait for process to end, it never seems to run the run after commands. It looks like gameex just kills the original process. I need to run commands on the esc trigger to clean up my processes.

Is there a hidden advanced config option in external apps? I tried adding the parameter to the ini, but nothing changed, so I assume not.

Is there a better way to handle this? Should I just add the web browser as an EMU and a map file and handle it that way? I don't want to do this as now with the new menu system some are sorted under video, some under games, some under weather, and ecomics menus.

Posted

I have been using normal bat scripting since NT so I feel very comfortable with it. I have used several other tools such as winbatch as well, but ended up going back plain old scripting because I could guarantee pushing it to a box and it working without a separate install.

Now do you suggest turning off GameEx's esc key mapping and having ahk spawn the web browser then wait to trap the esc keypress?

Posted

I think you need to tell your batch file to wait for the application that you are running from the bat file to close, and then clean up with the "Launch After" option in the emulator config.

Posted

Correct. If you can watch processes to see when they close with a batch file, then you don't need to use AHK. The primary reason I chose to move to AHK in the first place is because it's easy to watch for a program's state. Also, it's easy to convert the code into an EXE that can be run anywhere without installing anything.

Posted

Yes but the issue is the browser does not close. If it did that would solve my issue. A bat can be used to wait for processes to end. my issue is I need the functionalit to trap the esc and kill the child processes like advanced config does for emus.

I suppose I was going to dig into ahk at some point. Working on figureing out how to code this now.

On another note does anyone know if there is a coded limit to the number of external apps you can define in the ini?

Posted

This was the simplest way I could come up with to solve this issue.

-Run command

_____________________________________________________________

Webbrowser.cmd "http://www.netflix.com/MemberHome"

-WebBrowser.cmd

_____________________________________________________________

Start "AHK" AF4onEsc.exe

Start "IE" /wait "C:\Program Files\Internet Explorer\iexplore.exe" -new -k %1

TASKKILL /F /IM AF4onEsc.exe

-AF4onEsc

_____________________________________________________________

Esc::!F4

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