Author Topic: Project Tempest script problem  (Read 7413 times)

Aeliss

  • Hero Member
  • *****
  • Posts: 900
Re: Project Tempest script problem
« Reply #8 on: November 01, 2013, 05:50:28 AM »
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.

PP-Arcade

  • Newbie
  • *
  • Posts: 43
Re: Project Tempest script problem
« Reply #7 on: October 31, 2013, 02:00:31 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
  • *****
  • Posts: 900
Re: Project Tempest script problem
« Reply #6 on: October 31, 2013, 12:39:30 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 #

PP-Arcade

  • Newbie
  • *
  • Posts: 43
Re: Project Tempest script problem
« Reply #5 on: October 30, 2013, 03:54:38 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 Edit: October 30, 2013, 04:02:36 PM by PP-Arcade »

Aeliss

  • Hero Member
  • *****
  • Posts: 900
Re: Project Tempest script problem
« Reply #4 on: October 30, 2013, 03:44:27 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: (autoit) [Select]
;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 Edit: October 30, 2013, 03:47:18 PM by Aeliss »

PP-Arcade

  • Newbie
  • *
  • Posts: 43
Re: Project Tempest script problem
« Reply #3 on: October 30, 2013, 02:49:58 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:

Quote
if not $command then exit 0

$command = $command & ' '
   
hotkeyset("{esc}", "sendKey")

Works great now, thanx again for the help!  :D
« Last Edit: October 30, 2013, 02:56:25 PM by PP-Arcade »

Aeliss

  • Hero Member
  • *****
  • Posts: 900
Re: Project Tempest script problem
« Reply #2 on: October 30, 2013, 02:36:00 PM »
It's really strange.
Check in Systems.xml the tempest part is look this one

Code: [Select]
<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="&quot;%path\%file%ext&quot;" />
      <Cmd id="1" name="Project Tempest [Script]" value="&quot;%path\%file%ext&quot;" />
    </Emu>
    <Extensions>.jag,.zip</Extensions>
    <Active>True</Active>
    <Script>True</Script>
    <Database>False</Database>
  </System>


Make a try with this modification in script

Quote
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
Quote
if not $command then exit 0

$command = $command & '"'
   
hotkeyset("{esc}", "sendKey")

PP-Arcade

  • Newbie
  • *
  • Posts: 43
Project Tempest script problem
« Reply #1 on: October 29, 2013, 03:37:51 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]
"H:\....When i remove the " in the path name manualy after closing the error message it does work:
Code: [Select]
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]
;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]
"H:\...."(It doesn't put it there automaticly, maybe the enterkey is send to fast?)
« Last Edit: October 29, 2013, 03:57:35 PM by PP-Arcade »