coucou Posted October 21, 2009 Share Posted October 21, 2009 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?Regardscoucou Link to comment Share on other sites More sharing options...
lordicast Posted October 21, 2009 Share Posted October 21, 2009 You werent adding the variable just showing it. Run ("dc.exe -width=800 -height=600 "&$game) [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 21, 2009 Share Posted October 21, 2009 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 More sharing options...
coucou Posted October 21, 2009 Author Share Posted October 21, 2009 TNX guys or yr HELP It works like a charm coucou Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now