Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Batch File Newbie here... Help please...  (Read 2379 times)

0 Members and 1 Guest are viewing this topic.

slapaham

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 576
  • Last login:January 31, 2012, 05:32:32 pm
Batch File Newbie here... Help please...
« on: December 14, 2008, 12:01:07 pm »
THIS IS THE PROBLEM I STARTED WITH... I've been looking around and JelWel's previous posts on XYNTService have been really handy... now that I have Key2Joy as a service, it loads on startup at the same time as my frontend which is great, however, it isn't hidden/minimised - so you are welcomed with an ugly Key2Joy config screen before you get to the menu... not nice... how can I solve this problem?

THEN IT EVOLVED TO THIS... I also seem to be getting an internal error in Mamewah with this... Let me explain my software setup...

Simpletouch FE is shelled - from here you can then choose Mamewah for joystick games...

Key2Joy is a service.

I have read that to get rid of an error (not necessarily the same error as this) I'd make the frontend the service and Key2Joy the shell... is this correct? It still wouldn't solve the problem of hiding Key2Joy though...

NOW FROM READING AROUND, I'VE CONCLUDED BATCH FILES WOULD BE BETTER... but the only problem is I have never created Batch files... from what I've read this may work -    ?

3 files...

key2joy.bat

@ECHO OFF
START /min /wait C:\Program Files\Key2Joy\Key2Joy.exe
EXIT

simpletouch.bat

@ECHO OFF
START C:\Program Files\SimpleTouch\STFE.exe
EXIT

startup.bat

@ECHO OFF
start key2joy.bat
start simpletouch.bat
EXIT

Set 'startup.bat' as my Shell with instantsheller... then Key2Joy should load at the same time as SimpleTouch but be minimised and therefore hidden and then when I load Mamewah from Simpletouch it should be able utilise Key2Joy... or have got this totally wrong!?

Also, if this is correct, would it matter where I placed the Batch files? Hope I'm not being too thick! :blah:
« Last Edit: December 14, 2008, 01:37:06 pm by slapaham »

slapaham

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 576
  • Last login:January 31, 2012, 05:32:32 pm
Well, it nearly all works... put all the .bat files in the same directory and took out the full directories but instantsheller does not accept bat files... poo!
« Last Edit: December 14, 2008, 02:10:53 pm by slapaham »

slapaham

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 576
  • Last login:January 31, 2012, 05:32:32 pm
Re: Batch File Newbie here... Help please...
« Reply #2 on: December 14, 2008, 05:57:09 pm »
Now concluded... I have a rather overcomplicated software setup here...but once you get your head around it, it all makes sense! Now to fathom out how to kill joy2key on exiting Mamewah...

gonzo90017

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:June 23, 2019, 02:41:07 pm
  • I'm a llama!
Re: Batch File Newbie here... Help please...
« Reply #3 on: December 14, 2008, 09:25:34 pm »
Unzip the attached file inside your mamewah folder. Then edit Mamewah.ini and place the whole path to the file like so:
Code: [Select]
### External Application Settings ###
startup_app_commandlines                 
exit_app_commandlines                     
exit_and_run_app_commandlines   C:\juegos\Mamewah\close joytokey.exe {nowait}{autoquit}

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Batch File Newbie here... Help please...
« Reply #4 on: December 15, 2008, 06:42:11 am »
I like Command Line Process Viewer/Killer/Suspender because you can close a process using the "friendly" method of send a WM_CLOSE message.

Copy it into your Windows\System32 folder and run it like so from the batch

Code: [Select]
process -q key2joy.exe

slapaham

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 576
  • Last login:January 31, 2012, 05:32:32 pm
Re: Batch File Newbie here... Help please...
« Reply #5 on: December 15, 2008, 08:50:46 am »
Thanks Gonzo and Headkaze... great stuff! I will try Gonzo's method as the other one sounds more like I'll mess it up... !

Batch files are great! I never used them before but they sorted my first problem out brilliantly! Just had to get my head around the way my software runs... and in what order...

If the killing of Key2Joy works then I only have to try and get my LCD Topgun to work and I've got everything sorted and up-to-date on my cab but I reckon that'll be a thorn in my side for a while to come!

Thanks again!

tikbalang

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:May 07, 2013, 05:04:54 pm
    • MAME BootCD's for DOS
Re: Batch File Newbie here... Help please...
« Reply #6 on: December 15, 2008, 10:11:10 am »
you can also use just one batch file:

startup.bat
Code: [Select]
@ECHO OFF
START /min /wait C:\Program Files\Key2Joy\Key2Joy.exe
START C:\Program Files\SimpleTouch\STFE.exe
EXIT

right-click on startup.bat then "create shortcut". a *.PIF file will be created. try that with the instantsheller.

if you're on NT,2K,XP,vista, rename the .BAT file to .CMD and then try with the instantsheller.

slapaham

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 576
  • Last login:January 31, 2012, 05:32:32 pm
Re: Batch File Newbie here... Help please...
« Reply #7 on: December 15, 2008, 02:52:13 pm »
Thanks for that... I'll remember it for future reference but to be honest, the way I've set it up already is okay... although, thinking about it, your way would mean less stuff flashing up for a fraction of a second...mmm, when I have time, I may investigate further! Cheers!  :cheers:

rockmes

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 141
  • Last login:June 05, 2016, 09:41:38 am
  • Don't you love it?
Re: Batch File Newbie here... Help please...
« Reply #8 on: December 16, 2008, 01:27:14 am »
l do a similar thing to you in Mamewah. l have to run certain apps before starting a game. Example: need to run daemon tools to load a img file for the game and then ppjoykey.exe straight after with and ini file for my player 2 buttons to work for that certain game .Then when l exit the game l tell mamewah to close down the 2 program that were needed at the begining  This is my setup ini example that maybe can help you. l use bat files as well. take a look
By the way i use pskill.exe to kill any app.
« Last Edit: December 16, 2008, 01:31:03 am by rockmes »

slapaham

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 576
  • Last login:January 31, 2012, 05:32:32 pm
Re: Batch File Newbie here... Help please...
« Reply #9 on: December 16, 2008, 08:08:06 am »
Thanks. I think I'll be referring back to this thread next summer as this Christmas holidays I think I'm only going to have just enough time to get other things up and running... streamlining will come later!

dys

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:January 20, 2009, 11:47:54 am
Re: Batch File Newbie here... Help please...
« Reply #10 on: December 22, 2008, 09:38:38 am »
it'd be easier if done within visual basic. you can run batch files and applications such as joytokey hidden using vb code. visual basic is one way to go and the complied file (exe) can be called in startup via the registry, unlike batch files (well i dunno because i haven't tried appending it to autoexec.bat yet). but yes maybe you should consider this too.