Page 1 of 1

Project Tempest script problem

Posted: Tue Oct 29, 2013 8:37 pm
by PP-Arcade
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?)

Re: Project Tempest script problem

Posted: Wed Oct 30, 2013 7:36 pm
by Aeliss
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")

Re: Project Tempest script problem

Posted: Wed Oct 30, 2013 7:49 pm
by PP-Arcade
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

Re: Project Tempest script problem

Posted: Wed Oct 30, 2013 8:44 pm
by Aeliss
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

Re: Project Tempest script problem

Posted: Wed Oct 30, 2013 8:54 pm
by PP-Arcade
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+'

Re: Project Tempest script problem

Posted: Thu Oct 31, 2013 5:39 pm
by Aeliss
???

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 #

Re: Project Tempest script problem

Posted: Thu Oct 31, 2013 7:00 pm
by PP-Arcade
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)

Re: Project Tempest script problem

Posted: Fri Nov 01, 2013 10:50 am
by Aeliss
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.