Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > Scenario League / Civ2-Creation -Archive > Are Bat. files obsolete?
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread   
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:25
  Old Post 18-01-2004 08:12 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#31 Report this post to a moderator
Remove this text

Here's the SoG bat file.

code:
@echo off cls echo. echo Seeds of Greatness (v1.1) echo. echo (Copies in the correct Events file for the chosen civilization) echo. echo Please select your civ from the list below: echo. echo 1. Hittites echo 2. Babylonians echo 3. Assyrians echo 4. Egyptians echo 5. Persians echo 6. Greeks echo 7. Minoans echo X. Exit without Loading echo. choice /c:1234567X Enter your selection if errorlevel 10 goto done if errorlevel 9 goto done if errorlevel 8 goto done if errorlevel 7 goto Crete if errorlevel 6 goto Greece if errorlevel 5 goto Persia if errorlevel 4 goto Egypt if errorlevel 3 goto Assyria if errorlevel 2 goto Babylon if errorlevel 1 goto Hatti :Hatti echo. echo Hittites copy Events-H.txt events.txt goto done :Babylon echo. echo Babylonians copy Events-B.txt events.txt goto done :Assyria echo. echo Assyrians copy Events-A.txt events.txt goto done :Egypt echo. echo Egyptians copy Events-E.txt events.txt goto done :Persia echo. echo Persians copy Events-P.txt events.txt goto done :Greece echo. echo Greeks copy Events-G.txt events.txt goto done :Crete echo. echo Minoans copy Events-M.txt events.txt goto done :done echo. exit quit


From Tech and my past experience, the only possible crash point in the bat file is on the CHOICE line. I'm assuming that you saw no error message such as 'file not found' in the dos window.

Since you crashed later, I strongly suspect the problem lies with a scenario file other than the bat file. First suspect is the title.gif. Try renaming it and starting the scenario. The scenario may start normally (without the opening graphic). My other suspects are corrupted rules and events files. Reunzipping from Kull's zips should solve that kind of problem. Otherwise, I'm stumped.

Mercator is offline Mercator
King
Sorekara no Nanimo
Jan 1970
time: 06:25
  Old Post 18-01-2004 22:58 Visit Mercator's homepage!
Edit/Delete Message Reply w/Quote
#32 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Windows XP might not like some of what comes after the choice line. The errorlevel 10 and errorlevel 9 lines are unnecessary.

Well, re-unzip the scenario and try starting the scenario without running the batch file. The batch file only controls events, so the scenario should start just fine (except you won't have events)... If the scenario still crashes, it's a text/graphics file problem. If the scenario doesn't crash, it's a batch file problem.

Berzerker is offline Berzerker
Emperor
topeka, kansas,USA
May 1999
time: 23:25
  Old Post 19-01-2004 01:50
Edit/Delete Message Reply w/Quote
#33 Report this post to a moderator
Avatar Enlargement: We've got the solution

Yeah, the game plays ok w/o the batch. I'll try unzipping but the scenario creator said the events file greatly improves the game. Thx guys.

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:25
  Old Post 19-01-2004 12:05 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#34 Report this post to a moderator
Help yourself to an AD-FREE life

Berzerker, there's always the manual alternative. The important line for you is

code:
copy Events-B.txt events.txt
Kull stores the Babylonian events in Events-B.txt. With Windows Explorer or its ilk, you could try the following:

  1. Delete Events.txt
  2. Copy and paste Events-B.txt
  3. Rename "Copy of Events-B.txt" to Events.txt


Merc, does XP handle Errorlevels differently from earlier versions? Granted the first two "if errorlevel" lines are useless. AFAIK, XP still supports EL's up to 255. Choice doesn't seem to corrupt EL1 into EL10. That would be nasty.

[JUNK]

I did find XP (maybe NT, too) has some new toys.
code:
@echo off setlocal echo Checking OS ver|find "XP" if not errorlevel 1 goto :Choice echo This OS is not Windows XP goto Done :Choice echo. set /p UserInput=Choose 1-3: set UserInput=%UserInput:~0,1% if "%UserInput%"=="1" goto Continue if "%UserInput%"=="2" goto Continue if "%UserInput%"=="3" goto Continue goto Choice :continue goto Ans%UserInput% :Ans1 echo Ans%UserInput% goto Done :Ans2 echo Ans%UserInput% goto Done :Ans3 echo Ans%UserInput% goto Done one ' why are smileys interpreted between code markers? echo. echo Did it work?

I know the "goto Continue" and "goto Ans%UserInput%" add an extra few lines unnecessarily, but I was exploring a little.

So, XP can bypass CHOICE.COM with set /p. Unfortunately it stores only the first character entered by the user as a variable. That's probably not a fatal flaw.

Haven't figured out how to trap the error that happens when choice.com isn't found in the path.

[/JUNK]

All of this junk is to say that you can write batch files that check OS versions and for newer ones, use an alternative to choice.com.

Mercator is offline Mercator
King
Sorekara no Nanimo
Jan 1970
time: 06:25
  Old Post 19-01-2004 22:09 Visit Mercator's homepage!
Edit/Delete Message Reply w/Quote
#35 Report this post to a moderator
Support Apolyton buy from Amazon

I don't have XP, so I was just guessing (and being a perfectionist).

Interesting and useful info about the /p switch too.

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:25
Question  Old Post 20-01-2004 02:12 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#36 Report this post to a moderator
Mercator, Angelo, anybody, Put an end to popups!

Do you know of any websites that have tutorials for vbs scripting? I can search MS or Google, but thought I'd check first. It just seems a more elegant approach. I'm not asking you to write one—it just might be within my reach. It'd be nice just to have a simple OK/Cancel dialog with radio buttons to do this stuff. I'm actually after a vbs alternative combining Gothmog's ToT setup/restore batch files. His stuff is very well written, but it'd be nice to try something more windowsy.

Mercator is offline Mercator
King
Sorekara no Nanimo
Jan 1970
time: 06:25
  Old Post 20-01-2004 20:41 Visit Mercator's homepage!
Edit/Delete Message Reply w/Quote
#37 Report this post to a moderator
Support Apolyton buy from Amazon

Here you go:
http://download.microsoft.com/downl.../scrdoc56en.exe

That's the guides I use... um, well... I have them on my computer anyway.

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:25
  Old Post 22-01-2004 03:47 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#38 Report this post to a moderator
Got spare money?

Thanks!

Okay it looks like the only input 'native' VBScripts can take are from MsgBox (Yes/No) or InputBox (a string). Tell me that I'm wrong.

Writing a Yes/No front end to Gothmog's Setup and Restore bats for ToT is within my capability, but a form on an HTML page isn't.

Still I can get rid of Choice.com.

Mercator is offline Mercator
King
Sorekara no Nanimo
Jan 1970
time: 06:25
  Old Post 22-01-2004 06:07 Visit Mercator's homepage!
Edit/Delete Message Reply w/Quote
#39 Report this post to a moderator
Help yourself to an AD-FREE life

Yep, MsgBox and InputBox is all there is... I guess you could put the entire menu in the InputBox text and ask the user to enter the correct number. You can check that value for validity after that.

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:25
  Old Post 22-01-2004 06:34 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#40 Report this post to a moderator
Suffering from ads?

I have a old but legal copy of Visual Basic 6.0 Learning Edition. Is it worth installing on either a W98 or a WXP PC if I want to create a simple installation form with option buttons? I could probably write it in Excel VBA in 30 minutes (It used to be 5 minutes, but I'm rusty ), but then there'd be a requirement for Excel. What does VB6LE require on the user's PC?

Mercator is offline Mercator
King
Sorekara no Nanimo
Jan 1970
time: 06:25
  Old Post 22-01-2004 20:41 Visit Mercator's homepage!
Edit/Delete Message Reply w/Quote
#41 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

That's exactly what I've been using to make my utilities.

The user would require the VB run-time files, as you would have needed to install for MapEdit or any of my other utilities (and available on my website). It's slightly under 1MB in size... Of course everybody will already have those, thanks to me. And more seriously, I'm pretty sure everyone with WindowsXP actually does have them.

I also suggest you install the VB SP5, if you don't have it already:
http://msdn.microsoft.com/vstudio/d...ldoverview.aspx

For some controls you would need to add extra files (e.g. for the Open/Save File dialog, as I used in MapEdit). Those are the files that may make an installation a bit tedious, because they can't really be installed by hand easily... But those controls have to be added separately in VB as well (from the Components list), so you'll know which ones they are.

 
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:25.
Apolyton Time is 00:25.
    top of page
Rate This Thread:
archivepost
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0395 seconds (87.49% PHP - 12.51% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net