Jump to content

Using shellexecute with switches


Recommended Posts

I am very new to all of this so apologies if what I am saying does not make sense!

I have set up a mediapc connected to a TV and want to be able to use it to play games. I am using a program called Fusion as a Sega emulator so I can play sonic the hedgehog :) . I am using AutoIt as I need to load profiles for the controller etc and it seems to be the easiest way. So far everything is working fine.

The problem I am having, however, is that Fusion runs as default in a window. To run full screen automatically I need to add the -fullscreen switch. Unfortunatly I can't figure out how to wirte some code that both launches the game AND uses the full screen switch. This is what I have tried:

;Changing gamepad profile to Sega one
RunWait('"' & @ProgramFilesDir & '\Saitek\Software\PrfAct.exe" -v-f"C:\Program Files\Saitek\Software\Sega.dat" -A')
;Running game 
ShellExecuteWait('"' & @ScriptDir & '\SonicTheHedgehog.gen"')

Runs the game ok, so what I then tried to do was add a shortcut to Fusion in the same directory as the game with the -fullscreen switch in the shortcut. Just running the shortcut runs in full scren as would be expected but I can't figure out how to add it into the code. I tried:

;Changing gamepad profile to Sega one
RunWait('"' & @ProgramFilesDir & '\Saitek\Software\PrfAct.exe" -v-f"C:\Program Files\Saitek\Software\Sega.dat" -A')
;Running game 
RunWait('"' & @ScriptDir & 'Fusion SonicTheHedgehog.gen"')

But that didn't work!

Im stuck now so any help would be appreciated.

Thanks

Link to comment
Share on other sites

To run full screen automatically I need to add the -fullscreen switch. Unfortunatly I can't figure out how to wirte some code that both launches the game AND uses the full screen switch. This is what I have tried:

Is "-fullscreen" a command line parameter for "PrfAct.exe"? Because I don't see it anywhere in what you tried. Or are you talking about creating a shortcut with FileCreateShortcut() and using the @SW_SHOWMAXIMIZED state (see the help file)?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Is "-fullscreen" a command line parameter for "PrfAct.exe"? Because I don't see it anywhere in what you tried. Or are you talking about creating a shortcut with FileCreateShortcut() and using the @SW_SHOWMAXIMIZED state (see the help file)?

:)

You might want to try GameEx http://tomspeirs.com/gameex/ an excellent rom media center plugin, I use it my self :D

[font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...