Project Tempest script problem

Get answers to questions about using mGalaxy.
Post Reply
User avatar
PP-Arcade
Newbie
Newbie
Posts: 43
Joined: Wed Oct 09, 2013 2:19 pm

Hi, I got the mGalaxy_Script.exe for Project Tempest, but it doesn't work for me.
It auto inserts the path to the rom file, but I get a error that it can't find the file.
I knowthis the path name starts with:

Code: Select all

"H:\....
When i remove the " in the path name manualy after closing the error message it does work:

Code: Select all

H:\....
So my question is can some one change the script so it doesn't do a " in the path.

Here's the script that I used:

Code: Select all

;Parsing

Local $count = StringInStr($CmdLineRaw, ".exe", 0 , 1, 1)
local $app = StringLeft ( $CmdLineRaw, $count + 4 )
local $command = StringTrimLeft( $CmdLineRaw, $count + 4 )
if not $command then exit 0
   
hotkeyset("{esc}", "sendKey")
 
run('"' & $app & '"')
WinwaitActive("Project Tempest")
send("!f")
send("{enter}")
WinwaitActive("Open ROM File")
send($command, 1)
send("{enter}")
WinwaitActive("Project Tempest")
; Start the game (F2).
send("{F2}")
 
While WinExists("Project Tempest")
   Sleep (500)
Wend
 
exit 0
 
;[tidy up]
; Stop the game - F3.
; Close Project Tempest.
Func sendKey()
   Send ("{F3}")
   WinClose("Project Tempest")
   exit
Endfunc
Ps. I just knowthis putting a " at the end of the path manualy also works.

Code: Select all

"H:\...."
(It doesn't put it there automaticly, maybe the enterkey is send to fast?)
Last edited by PP-Arcade on Tue Oct 29, 2013 8:57 pm, edited 1 time in total.
Aeliss
Hero Member
Hero Member
Posts: 900
Joined: Thu Apr 04, 2013 5:55 pm

It's really strange.
Check in Systems.xml the tempest part is look this one

Code: Select all

 <System>
    <Name>Atari Jaguar</Name>
    <AppPath>F:\emulateur\Atari\Jaguar\Project_tempest\PT.exe</AppPath>
    <RomPath>F:\emulateur\Atari\Jaguar\rom</RomPath>
    <SnapPath>F:\emulateur\Mgalaxy\snapsemul\jaguar</SnapPath>
    <VidPath />
    <Emu selected="0">
      <Cmd id="0" name="Virtual Jaguar [Script]" value=""%path\%file%ext"" />
      <Cmd id="1" name="Project Tempest [Script]" value=""%path\%file%ext"" />
    </Emu>
    <Extensions>.jag,.zip</Extensions>
    <Active>True</Active>
    <Script>True</Script>
    <Database>False</Database>
  </System>

Make a try with this modification in script
if not $command then exit 0
 
msgbox(64,"info",$command) 
 
hotkeyset("{esc}", "sendKey")
You will have a msgbox with the command passed to the dialog (if all is ok it will be "H:\...."

To try to correct you bug you can try this modification
if not $command then exit 0

$command = $command & '"'
 
hotkeyset("{esc}", "sendKey")
User avatar
PP-Arcade
Newbie
Newbie
Posts: 43
Joined: Wed Oct 09, 2013 2:19 pm

Thanx,

The Systems.xml is correct.
The msgbox gives right path "H:\...."
But after closing the msgbox its back to no " at end..
The modification gives 2 " at end of path name:  "H:\....""

Realy strange  :-\

Ps. I got it working now, i send a empty space as the modification:
if not $command then exit 0

$command = $command & ' '
 
hotkeyset("{esc}", "sendKey")
Works great now, thanx again for the help!  :D
Last edited by PP-Arcade on Wed Oct 30, 2013 7:56 pm, edited 1 time in total.
Aeliss
Hero Member
Hero Member
Posts: 900
Joined: Thu Apr 04, 2013 5:55 pm

I can't explain this bug, but empty space isn't a problem for emulator, so I think it s a good idea to modify the official script with your modif, to prevent this strange bug.

Can you make a try with this one,pls, it will be the next script.

Code: Select all

;Parsing
Local $count = StringInStr($CmdLineRaw, ".exe", 0 , 1, 1)
local $app = StringLeft ( $CmdLineRaw, $count + 4 )
local $command = StringTrimLeft( $CmdLineRaw, $count + 4 )
if not $command then exit 0
   
hotkeyset("{esc}", "sendKey")

run('"' & $app & '"')
WinwaitActive("Project Tempest")
send("!f")
send("{enter}")
WinwaitActive("Open ROM File")
send($command & ' ', 1)
send("{enter}")
WinwaitActive("Project Tempest")
; Start the game (F2).
send("{F2}")

While WinExists("Project Tempest")
   Sleep (500)
Wend

exit 0

; Stop the game - F3.
; Close Project Tempest.
Func sendKey()
   Send ("{F3}")
   WinClose("Project Tempest")
   exit
Endfunc
Last edited by Aeliss on Wed Oct 30, 2013 8:47 pm, edited 1 time in total.
User avatar
PP-Arcade
Newbie
Newbie
Posts: 43
Joined: Wed Oct 09, 2013 2:19 pm

Tested, works perfect  :D

I think the "bug" was like when you type in notepad and enter a " you need to hit space after doing the shift+'
Last edited by PP-Arcade on Wed Oct 30, 2013 9:02 pm, edited 1 time in total.
Aeliss
Hero Member
Hero Member
Posts: 900
Joined: Thu Apr 04, 2013 5:55 pm

???

What is your window version ?
What is your system nationality ?
Special Keyboard/configuration ?

In notepad like for project tempest, I don't need to hit space, I just press the 3"# key.
At the base it's a "
I need to press shift to have a 3
And alt to have a #
User avatar
PP-Arcade
Newbie
Newbie
Posts: 43
Joined: Wed Oct 09, 2013 2:19 pm

Windows XP Pro, 2002, Service Pack 3
Dutch System (The Netherlands)
No special keyboard configuration

Only got 2 keys under the 3 key:
At the base its a 3
Shift makes it a #
Alt does nothing

Annyways the script you posted works  8)
Aeliss
Hero Member
Hero Member
Posts: 900
Joined: Thu Apr 04, 2013 5:55 pm

Yep, but it s good to know. I have look for you keyboard, it s really different  than mine (french keyboard), on mine really few key need this method to work (^ ¨) but not theses one on number keys.

And yes you are right for the bug, mgalaxy have already modified the script with your technic.
Post Reply