InterviewSolution
| 1. |
Solve : Batch file with errors? |
|
Answer» I have created a batch file that should do this : 1. Miljard_r.lnk starts before Qres have changed resolution resulting in a fake statement - Qres thinks he is done, but he haven't done anything If you run Qres from the command prompt does it work? How long does it take? Try adding a ping command after Qres to delay the start of Miljard_r.lnk Quote 2. The icons on my desktop moves like crazy - Is there anyway to lock each one at a specified point ? I would imagine so if you're changing the screen resolution. After you REVERT back to 1280x1024 are the icons in the proper locations? Quote 3. How do I replace the questionmark in my code with the ASCII-letter "132" ? Use the Windows Character Map to find character 132 for your font. You can copy the character to the clipboard and paste it into your batch file. Good luck. 1. Less than a second - when it works 2. Nope, that's why I need to lock them, otherwise my desktop gets very messy 3. Nope, it would only show the wrong letter EDIT: I have ADDED this to my code : SLEEP.EXE 1I'd of done this; Code: [Select]@echo off echo echo Miljard?r is Loading.. ::This make the game launch in the right resolution start /WAIT QRes.exe /x:800 /y:600 start /wait Miljard_r.lnk ::This resets the resolution start /wait QRes.exe /x:1280 /y:1024 Echo Miljard?r Closes... Notice the 'start /wait' before running QRes and the Miljard link. It will make the batch file pause until the command/program has completed. That should fix the problem with it loading the game before the res has had a chance to set. As for the icons not being in the same place everytime, all I can suggest is using 'auto arrange' on your desktop. hope it helps. You had the right idea with sleep. Ping can do the same thing but not everybody has the sleep command on their system. Using start with the /wait switch merely shifts the problem to another window. Quote 1. Less than a second - when it works Why and when doesn't it work? Perhaps you can test the return code. If you do check the return code, don't use the sleep command. Code: [Select]:@echo off echo Miljard?r is Loading... ::This make the game launch in the right resolution QRes.exe /x:800 /y:600 if errorlevel 1 goto :eof Miljard_r.lnk ::This resets the resolution QRes.exe /x:1280 /y:1024 Echo Miljard?r Closes... For the icons, the previous post might be onto something. Set the desktop to auto-arrange the icons. According to the standard ASCII chart, character 132 is character: ä. Why could you not get this off the Windows Character Map. /wait wont work And that about that letter "ä" - It won't show up as it should, why does it give me an "ò" instead ? When I launch the code now - the game has "almost" right resolution, but it's in the top-left corner with a grey box filling out the rest The game is now launching in 1024x768 - But my desktop resolution is still 1280x1024 Here is the rewritten code : Code: [Select]@echo off echo Miljard?r is Loading... QRes.exe /x:1024 /y:768 Sleep.exe 1 Miljard_r.lnk Sleep.exe 1 QRes.exe /x:1280 /y:1024 Echo Miljard?r Closes... I changed from 800x600 to 1024x768 due messy grapics when using 800x600 Seems hard to deal with this program By the way : I'm using the SLEEP.EXE dos file from here. I need to lock my icons - otherwise DreamScene will have icons on it Quote The game is now launching in 1024x768 - But my desktop resolution is still 1280x1024 Not really understanding this, but hey, if the game is happy, so am I. Did you try auto-arranging the icons? Right click the Desktop==>Arrange Icons By==>Auto Arrange. The sleep command you have is fine. Just pointing out that sleep came with the Windows 2003 toolkit and not everybody has it installed. Have you considered using DOSBox. I've never used it but I understand it can help with old games. Good luck. I have no answer for character 132 (ä). If you can't copy/paste it from the post, then whatever application you're using is interpreting it as something else. Could be your font.This game was created 2005 or 2006 - So it's not old And I'm getting nowhere with this I just MESSED the whole game up now * Ryder17z leaves this project...* Ryder17z begins a new project... |
|