Jump to content

HELP, problem with a string


coucou
 Share

Recommended Posts

Hi,

I Installed a game for my grandchildren, and look how to automate the game-launcher.

In fact I've to change the VGA resolution resolution to 800x600, run the game, and then restore the original display settings when the game stops running.

This small tool Display Changer 4.1.4. More Info do the job just fine.

The command should be

$game = "C:\Program Files\Coktel\Adiboud'Chou\Adiboud'Chou au Cirque\AC1.EXE"
Run ("dc.exe -width=800 -height=600 $game")

The problem is AutoIt does not reconize $game, it return Missing separator character after keyword. error message.

In fact, the path string enclose quotes C:\Program Files\Coktel\Adiboud'Chou\Adiboud'Chou au Cirque\AC1.EXE.

Any one can help how can I reormulate this command?

Regards

coucou

Link to comment
Share on other sites

Hi,

I Installed a game for my grandchildren, and look how to automate the game-launcher.

In fact I've to change the VGA resolution resolution to 800x600, run the game, and then restore the original display settings when the game stops running.

This small tool Display Changer 4.1.4. More Info do the job just fine.

The command should be

$game = "C:\Program Files\Coktel\Adiboud'Chou\Adiboud'Chou au Cirque\AC1.EXE"
Run ("dc.exe -width=800 -height=600 $game")

The problem is AutoIt does not reconize $game, it return Missing separator character after keyword. error message.

In fact, the path string enclose quotes C:\Program Files\Coktel\Adiboud'Chou\Adiboud'Chou au Cirque\AC1.EXE.

Any one can help how can I reormulate this command?

Regards

coucou

You just need the variable reference outside the literal part of the string:
Run ("dc.exe -width=800 -height=600 " & $game)

Or, if you need double quotes around the executable path:

Run ('dc.exe -width=800 -height=600 "' & $game & '"')

:)

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

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...