Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is this even possible? Batch script to load each game once.
#1
I'm using Gzip for my ISOs and am wondering if there would be a way for somebody to help me with a script that would do the following in that order.

1. Open PCSX2.
2. Load the first game in a folder.
3. Once the game has loaded successfully, close PCSX2.
4. Launch it again.
5. Load the next game from within the same folder.

And on, and on, and on...

The reason? I want to create the index files for each game in one shot (instead of manually loading them all one-by-one)

Is there a way to do this via batch files and the like?
Reply

Sponsored links

#2
perhaps the autoit script was the best:
this following auto execute code :
HotKeySet("{ESC}","Solo_Switch")
If $CmdLine[0]==1 Then
;$AlcoholDir=@ProgramFilesDir & "C:\Program Files (x86)\Alcohol Soft\Alcohol 120"
$isocmd="C:\Program Files (x86)\UltraISO\drivers\isocmd.exe"
$xbmcDir="C:\Program Files (x86)\Kodi"
$Pcsx2Dir="H:\Programs\PCSX2"
$application="H:\Programs\Pcsx2\pcsx2-r5875.exe"
$ROM=$CmdLine[1]
ProcessClose("kodi.exe")
;RunWait(@ComSpec & ' /c axcmd 0: /m:' & '"' &$ROM& '"',$AlcoholDir,@SW_HIDE)
ShellExecuteWait($isocmd, ' -mount I: ' & '"' & $ROM & '"' )
Sleep(1500)
Run($application &" --nogui --fullboot --fullscreen --usecd")
WinActive("PCSX2")
While 1
Sleep(100)
WEnd
EndIf

Func Solo_Switch()
Run($Pcsx2Dir&"\pcsx2-killer.bat")
;;Run(@ComSpec & ' /c axcmd 0: /u',$AlcoholDir,@SW_HIDE)
ShellExecute($isocmd, ' -eject I: ')
Run($xbmcDir &"\kodi.exe")
WinWaitActive("Kodi")
Send("{F2}")
Exit 0
EndFunc
Reply
#3
Unfortunately, this doesn't seem to involve any kind of order running down a folder. Plus, it involves other apps. Beyond that, I can't make much of it.

What I need has probably never been done before, specifically. So I'm wondering if anybody has the ability to let me know if it's possible to craft such a script.
Reply
#4
one way for each game write a batch like this pcsx2 --nogui --fullscreen %game_iso_path%
Reply
#5
make a .bat file in windows and paste this inside of it and run it (dont forget to change the paths so they match where your stuff is kept). It opens each iso and waits 15 seconds..then it closes pcsx2 and opens the next one in the directory:

d:
REM (change this path to wherever your isos are)
CD "D:\Emulation\ROMS\PS2"
For /R %%G in (*.iso) do call :openiso "%%G"
goto :EOF

:openiso
ECHO %1
start "pcsx2-r5875" "C:\Program Files (x86)\PCSX2 1.2.1\pcsx2-r5875.exe" %1
TIMEOUT 15
taskkill /F /IM pcsx2-r5875.exe
GOTO :EOF
Cooler Master HAF X Full Tower
ASRock Z97 Extreme4
EVGA GeForce GTX 970 4GB
EVGA SuperNOVA 850W
Intel Core i5-4690K - OC'ed to 4.5GHz
G.SKILL Ripjaws X 8GB DDR3 1600
CORSAIR Hydro H105
Indigo Xtreme 115X-XS Metallic TIM
Windows 7 SP1 64-bit
PCSX2 1.4.0 unless otherwise specified
Reply
#6
Here is little program I just made just for the exercise.
When you start it,you have to do couple of things
1.Choose the pcsx2 path from the Browse button(once you choose the path,the button will be renamed to Run)
2.Right click on the list and choose "Add Games"
Choose the directory where your games are(I didn't added a sub directory support)and the program will add only gz files that don't have index created
3.Once the list is created,click on the Run button and the program will run every game one after another and check every 3 seconds if the index is created(if not,it will wait another 3 seconds)

I tested it with 5 games and it worked fine


Attached Files Thumbnail(s)
   

.rar   GZip Index.rar (Size: 339,25 KB / Downloads: 60)
Reply
#7
Wow!

Thank you SO much, guys!

This is nothing short of amazing! I'll definitely try those and provide feedback for sure. Be sure to check in 2-3 days. Smile
Reply
#8
(08-19-2015, 07:36 PM)vsub Wrote: Here is little program I just made just for the exercise.
When you start it,you have to do couple of things
1.Choose the pcsx2 path from the Browse button(once you choose the path,the button will be renamed to Run)
2.Right click on the list and choose "Add Games"
Choose the directory where your games are(I didn't added a sub directory support)and the program will add only gz files that don't have index created
3.Once the list is created,click on the Run button and the program will run every game one after another and check every 3 seconds if the index is created(if not,it will wait another 3 seconds)

I tested it with 5 games and it worked fine

I can confirm that everything works great! It runs flawlessly, in fact.

There were two gzipped games that were corrupted. What happens in that case is the emulator crashes and the entire index file creation process is stopped until somebody presses on the "Close" button. But no big deal since this was obviously my fault.

Thank you ever so much! You saved me so so so many hours!
Reply




Users browsing this thread: 1 Guest(s)