|
-
June 7th, 2007, 09:01 PM
#1
Time Delay in Ending Batch Process?
I wrote a batch file that swaps some files around to configure the flight dynamics of a Flight Simulator aircraft that I have installed. The batch file offers the user 5 menu choices, and upon selection, deletes the existing flight dynamics .cfg (aircraft.cfg), moves a .txt file into the active folder, and then renames the .txt file "aircraft.cfg".
Upon completion of the file swap, I used "goto done" to echo some final instructions to the user and credit myself for the "configuration utility". From "done", I used @pause (press any key to continue) which takes the user to "end" and of course ends the batch process and closes the DOS window. I just think "Press any key to continue" is inappropriate for ending the batch job. "Press any key to close the configuration utility" would be fine, but I don't know how to do that either.
I'd really like it to go to "end" on it's own, after a 10 second delay for the user to read the final instructions, without further input from the user. Something with a countdown like "Batch process terminating in: 10, 9, 8, seconds" would be great. Is there any way to do this?
Here's my file:
Code:
@echo off
echo Project Opensky 767-300 flight dynamics configuration utility
echo -------------------------------------------------------------
echo.
echo 1. Configure "realistic" FDE for 767-300ER w/GE CF6-80C2 engines
echo applicable for use with:
echo Air Canada NOC, All Nippon Airways NC, American Airlines N376AN
echo Delta Air Lines NOC, LAN Chile NC, Air New Zealand "Lord of the Rings"
echo.
echo 2. Configure "realistic" FDE for 767-300ER w/PW 4060 engines
echo applicable for use with:
echo Hawaiian Airlines N587HA, Martinair NC, Thomas Cook (circa 2004) D-ABUB
echo United Airlines NC, Posky House Colors
echo.
echo 3. Configure "realistic" FDE for 767-300 w/GE-CF6-80C2 engines
echo applicable for use with:
echo Japan Airlines NC,
echo.
echo 4. Configure "realistic" FDE for 767-300FER(cargo version)w/GE-CF6-80C2 engines
echo applicable for use with:
echo UPS NC,
echo.
echo 5. Configure "Easy" FDE for 767-300 w/any engine
echo applicable for use with any variation
echo.
choice /C:12345 Select a configuration from the list above
if errorlevel 5 goto 767-300-Easy
if errorlevel 4 goto 767-300FER-GE-CF6-80C2
if errorlevel 3 goto 767-300-GE-CF6-80C2
if errorlevel 2 goto 767-300ER-PW4060
if errorlevel 1 goto 767-300ER-GE-CF6-80C2
:767-300ER-GE-CF6-80C2
cls
echo.
echo You've chosen "realistic" FDE for 767-300ER w/GE CF6-80C2 engines
echo applicable for use with:
echo Air Canada NOC, All Nippon Airways NC, American Airlines N376AN
echo Delta Air Lines NOC, LAN Chile NC, Air New Zealand "Lord of the Rings"
echo.
@pause
@echo off
cd ..
del /q aircraft.cfg
copy configuration\767-300ER-GE-CF6-80C2.txt
ren 767-300ER-GE-CF6-80C2.txt aircraft.cfg
goto done
:767-300ER-PW4060
cls
echo.
echo You've chosen "realistic" FDE for 767-300ER w/PW 4060 engines
echo applicable for use with:
echo Hawaiian Airlines N587HA, Martinair NC, Thomas Cook (circa 2004) D-ABUB
echo United Airlines NC, Posky House Colors
echo.
@pause
@echo off
cd ..
del /q aircraft.cfg
copy configuration\767-300ER-PW4060.txt
ren 767-300ER-PW4060.txt aircraft.cfg
goto done
:767-300-GE-CF6-80C2
cls
echo.
echo You've chosen "realistic" FDE for 767-300 w/GE-CF6-80C2 engines
echo applicable for use with:
echo Japan Airlines NC,
echo.
@pause
@echo off
cd ..
del /q aircraft.cfg
copy configuration\767-300-GE-CF6-80C2.txt
ren 767-300-GE-CF6-80C2.txt aircraft.cfg
goto done
:767-300FER-GE-CF6-80C2
cls
echo.
echo You've chosen "realistic" FDE for 767-300FER(cargo version)w/GE-CF6-80C2 engines
echo applicable for use with:
echo UPS NC,
echo.
@pause
@echo off
cd ..
del /q aircraft.cfg
copy configuration\767-300FER-GE-CF6-80C2.txt
ren 767-300FER-GE-CF6-80C2.txt aircraft.cfg
goto done
:767-300-Easy
cls
echo.
echo You've chosen "Easy" FDE for 767-300 w/any engine
echo applicable for use with any variation
echo.
@pause
@echo off
cd ..
del /q aircraft.cfg
copy configuration\767-300-Easy.txt
ren 767-300-Easy.txt aircraft.cfg
goto done
:done
cls
echo.
echo The FDE has been configured according to your selection. Start Flight Simulator
echo and chose your aircraft from the "Select Aircraft" menu under:
echo.
echo Manufacturer: Project Opensky
echo Model: 767-300
echo.
echo This configuration utility was created by Jim Robinson
echo.
@pause
goto end
:end
Thanks, I appreciate any input anyone might have.
Jim
- ASUS A7V266-E
- Athlon XP 1900+
- Coolermaster HHC-001 CPU Cooler
- 512 MB Crucial PC2100 DDR RAM
- ASUS V8200T2, 64MB (GeForce 3 Ti200)
- Twin 40 GB, 7200 RPM Western Digital IDE Ultra ATA 100, RAID 0 (FAT 32)
- Enermax EG365P-VE(FCA) 350w ATX Power Supply
- Lite-On 8x-4x-12x DVD-RW/+RW
- Lite-On 16x DVD-ROM
- Lian-Li PC-61 Aluminum ATX Case
- Dual Boot, Windows 98se, Windows XP Pro
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|