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
techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:25
Question  Old Post 08-02-2003 10:53 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Are Bat. files obsolete? Support Apolyton, buy Civilization 2

With increasing numbers of people 'upgrading' to Windows XP, there are more and more complaints about batch files not working. These are simple DOS based programs which copy and overwrite files in the main Civ directory and in the scenario folder, allowing changes in graphics, units, terrain and events.

It has been suggested that installing a file called "Choice" (see attached) will allow Bat. files to work with XP. While they will actually run with choice installed, they don't work the way they're supposed to. In fact, the more times you run them the more they screw up the files they're supposed to change back and forth.

So my question is whether or not anyone is able to come up with a solution, or whether Bat. files will be rendered obsolete?

Attachment: choice.zip
This has been downloaded 66 time(s).

DarthVeda is offline DarthVeda
Emperor
My avatar! My precious!
Jan 1970
time: 00:25
  Old Post 08-02-2003 11:52 Visit DarthVeda's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Put an end to popups!

I don't know whats wrong with you people, it's not that hard to use a batch file and put choice in your scenario directory...

techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:25
  Old Post 08-02-2003 12:14 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
Originally posted by DarthVeda
I don't know whats wrong with you people, it's not that hard to use a batch file and put choice in your scenario directory...


What is it about "It doesn't work" that you don't get?

our_man is offline our_man
Prince
Glasgow, Scotland
Oct 2000
time: 05:25
  Old Post 08-02-2003 18:52
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Get a bigger avatar today!



I've never had a problem running batch files under windows XP after installing choice.

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:25
  Old Post 08-02-2003 19:55 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

Okay, before we ignite, let's debug a little. Here's a test for CHOICE.

This batch file works repeatedly on my XP machine, when CHOICE is called from a local directory.

quote:
@echo off
cls
echo.
echo Please choose from the options below:
echo.
echo 1. Option 1
echo 2. Option 2
echo Ctrl-Break. Exit without Loading
echo.
choice /c:12 Enter your selection

if errorlevel 2 goto Opt2
if errorlevel 1 goto Opt1

:Opt1
echo Opt1
goto done

:Opt2
echo Opt2
goto done

:done
echo.
pause
exit


So now I'm pretty sure that CHOICE.COM isn't the problem, at least when called from the local directory. I'll test some more when I have a chance. From your other posts, Tech, I'd suspect the copy portion of the batch file is at fault.

Even so, BAT files are obsolete. I just don't know of anything better.

DarthVeda is offline DarthVeda
Emperor
My avatar! My precious!
Jan 1970
time: 00:25
  Old Post 08-02-2003 20:51 Visit DarthVeda's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Inflate your Upload Space

I've had WindowsXP for the last year and a half, and have never had a major problem with batch files as long as choice.com was installed and properly working. There are two places to install it:

1. In the scenario directory (this is a temporary fix and will work only for this scenario)
2. In the windows System32 directory. This will fix it until you reformat.

I've had the occassional glitch where a rules file doesn't copy for some reason but that is 1 in about 500 sessions that happens.

techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:25
  Old Post 08-02-2003 21:14 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton or Terrorists Win

I've had XP installed for the best part of a year on my D drive. I kept Win98 on the C drive, though I just use the XP. I'm specifically referring to the Bat. files in Red October. It includes a bat. file which changes the dialog and city files and 3 .dll files in the main ToT directory.

It works fine in Win98; never had a problem. It doesn't work at all in XP. Here's the screen I get. If I'm doing something wrong, please tell me.

Attachment: bat.gif
This has been downloaded 293 time(s).

H Tower is offline H Tower
Emperor

Jul 2001
time: 23:25
  Old Post 08-02-2003 21:33
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

i'm new to xp, so i've never heard of choice, i'll have to go check this out if it really works

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

Tech, you're onto something. XP enforces a rule that presumably Win98 doesn't. XP requires a second argument for CHOICE.COM after the /Cyx in RO's Restore.bat. When I appended "Enter your selection", it worked okay on my XP. If it's not there, the result isn't pretty. A line of abnormal characters is displayed.

The pertinent 'code' with the change underlined.

quote:
:echo off
echo This procedure restores ToT graphic files to their previous state.
echo -
echo DISCLAIMER: You run this procedure at you own risk.
echo -
echo Press y to continue
echo Press x to exit
choice /C:yx Enter your selection
IF errorlevel 2 goto abort
etc.


Two panels attached: top, no 2nd string; bottom, 2nd string present.

Attachment: ro restore error msg.png
This has been downloaded 289 time(s).

techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:25
  Old Post 09-02-2003 01:07 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Got spare money?

Thanks, though I'm not sure I understand it. I see the C drive referenced in your new line. Could that fact that I've moved everything to the D drive have also affected this?

DarthVeda is offline DarthVeda
Emperor
My avatar! My precious!
Jan 1970
time: 00:25
  Old Post 09-02-2003 01:11 Visit DarthVeda's homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

No. /C is a switch. It has absolutely nothing to do with what drive the program or the scenario is located.

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:25
  Old Post 09-02-2003 02:35 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

quote:
I see the C drive referenced in your new line. Could that fact that I've moved everything to the D drive have also affected this?


No, I'm pretty sure that as long as CHOICE.COM is either in the local drive or the path (usually c:\Windows\System32 and c:\Windows) you're okay. Otherwise the error message would be different.

Looks like you already understand how to use the /C switch that DV's referring to.

Simply put some text after the "/Cyx" argument. It can be multiple words, though there's undoubtedly a limit on total length (64 characters?, 128?). As long as there's a space between "/Cyx" and the new text, it ought to work.

What you've shown in RO is that W98 doesn't care whether the additional text is there or not. With WXP, however, that bit of text after "/Cyx" (where y and x are the keys that the user uses to reply) appears to be absolutely essential. 'Sfunny the bugs that a new OS can bring out of an old program.

mordhiem is offline mordhiem
Warlord
Newbury, UK
Mar 2002
time: 05:25
  Old Post 09-02-2003 03:59
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

Hooray! A reason to not have XP. Maybe I won't spend the (ridiculous) 100+ quid to upgrade...

DarthVeda is offline DarthVeda
Emperor
My avatar! My precious!
Jan 1970
time: 00:25
  Old Post 09-02-2003 04:11 Visit DarthVeda's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Get a bigger avatar today!

You were going to pay for that?

St Leo is offline St Leo
King of Scenario League
Member of the Apolyton Social Democratic Party
Jul 2005
time: 00:25
  Old Post 09-02-2003 08:03 Visit St Leo<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Get a bigger avatar today!

Friends don't let friends pirate Microsoft programmes.

ottok is offline ottok
Prince
tampere,FINLAND
Oct 1999
time: 05:25
  Old Post 09-02-2003 20:38 Visit ottok's homepage!
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Avatar Enlargement: We've got the solution

BAT LIFE CONTINUESILLY!?

ravagon is offline ravagon
King
Australia
Sep 1999
time: 13:25
Post  Old Post 10-02-2003 05:21
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

quote:
Originally posted by St Leo
Friends don't let friends pirate Microsoft programmes.


Rather - Friends should warn friends about using Microsoft programmes - period.

Having had my fill of XP I'm now thinking of upgrading to W98...

Angelo Scotto is offline Angelo Scotto
Warlord
Milan, Italy
Oct 1999
time: 05:25
  Old Post 27-04-2003 16:29
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Re: Are Bat. files obsolete? Get a bigger avatar today!

quote:
Originally posted by techumseh
So my question is whether or not anyone is able to come up with a solution, or whether Bat. files will be rendered obsolete?


Batch files are obsolete, but they were already obsolete several years ago:
When Microsoft started designing Win95 it was clear that old DOS batch files were not flexible enough to work with the new OSes.
So they developed the "Windows Script Host" as a kind of Windows Batch Files, Win98 was the first OS of the Windows family to have WSH embedded but it is also present in ME,NT and XP operating systems.
So, in fact, the solution for post-batch era is already on your computer
You can download latest WSH version (5.6 i think) from Microsoft at http://msdn.microsoft.com/scripting
but if you've XP you should already have it, just download the documentation.
To discover which WSH version you've installed open a DOS Prompt and write "cscript" it should print the WSH header containing the version number.

I'm trying to attach (let's hope i succeed...) two versions of Boco example, one in JScript (the Microsoft version of JavaScript)
and the other in VBScript (a macro language based on Visual Basic).
I personally prefer JScript syntax but VBScript probably is more similar to DOS Batch files.
To try them open a DOS prompt, move to the directory where you downloaded the scripts, and launch the interpreter writing "cscript BatsAreObsolete.js" or "cscript BatsAreObsolete.vbs".
Unfortunately you can't simply double click on them because doing so you will launch the WScript (Windows Parser) instead of CScript (Console parser, will work in a DOS Prompt windows) but you can create a single-line BAT file (funny isn't it? ) containing the line: "cscript scriptfilename" just to launch the console parser.

IMHO WSH is really more powerful than old DOS Batch files because, for example, you can rewrite the code of my example to work with WScript instead of CScript, showing windows and dialog boxes to the final user instead of few lines on a terminal screen, without talking about features of jscript or vbscript which are (almost...) real programming languages, and, last but not least, they can interact and use ActiveX objects and this opens endless possibilities (if someone is so crazy to start writing a couple of "ScenarioLeague's" ActiveX components...)

Greetings,
Angelo

Attachment: batsareobsolete.zip
This has been downloaded 17 time(s).

techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:25
  Old Post 27-04-2003 18:43 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Support Apolyton or Terrorists Win

It's good to have you back, Angelo.

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:25
  Old Post 27-04-2003 18:44 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Remove this text

This I've got to check out. Thanks! Vscript is (almost) within my ability!

Henrik is offline Henrik
Emperor
The European Union, Sweden, Lund
Dec 2000
time: 06:25
  Old Post 27-04-2003 18:51 Visit Henrik's homepage!
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
Remove this text

Would those Jscripts be compatible with macs (as normal java scripts are)?

Angelo Scotto is offline Angelo Scotto
Warlord
Milan, Italy
Oct 1999
time: 05:25
  Old Post 29-04-2003 00:48
Edit/Delete Message Reply w/Quote
#22 Report this post to a moderator
Inflate your Upload Space

quote:
Originally posted by techumseh
It's good to have you back, Angelo.


And it's good to be here again techumseh

quote:
Originally posted by Henrik
Would those Jscripts be compatible with macs (as normal java scripts are)?


Well, this is an interesting question.

I'm extremely ignorant about Mac things so correct me if i'm going to write something obviously wrong:

From personal experience JScript share the same syntax of JavaScript, maybe there are some differences but i've never stumbled on them and for our task of emulating old batch files i don't think we'll stumble on them too.

The differences are, obviously, in the WSH side and on the objects it exposes.

While in Windows there is a WScript object to manage all, in Mac (i'm talking about JavaScriptOSA implementation) you have a MacOS object.

So, the language is probably the same but the objects on which it operates aren't.

This problem could be solved in an easy way, but it remains a problem that made argue with MacOS several times in the past: Where on the hell is the Shell?
I know that since MacOSX the Mac OS is heavily based on UNIX, so it now has a Shell but looking at the JavaScriptOSA homepage (http://www.latenightsw.com/freeware/JavaScriptOSA/) i was unable to find a command to write a line of text to a Unix Shell or to read the user answer from that shell.

If you're able to find a way to write and read data from the shell using JavaScript then the other things can be easily solved and you'll have a way to execute directly JScript files under Mac otherwise...

I've found this old webpage of the Mozilla project (http://www.mozilla.org/status/1999-9-17.html) which say:
"Waldemar has also made the stand-alone JavaScript shell work as a Macintosh MPW tool."
I've no idea what a MPW tool is, anyway the word Javascript near the word shell seems a promising starting point, you could check if current version of Mozilla for macintosh comes with a JavaScript Shell.

Unfortunately keep in mind that probably VBScript will be the choice of the majority of designers since it resembles DOS Batch files and there's no simple way to port it to the Mac.

Berzerker is offline Berzerker
Emperor
topeka, kansas,USA
May 1999
time: 23:25
  Old Post 18-01-2004 00:46
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Full PM-box? Change here!

Ugh, I hate to bother you guys but how do I follow Angelo's instructions for microsoft scripting? I'm very computer illiterate and need my hand held going thur this. I have XP but don't know where to put the dl or documentation.

Berzerker is offline Berzerker
Emperor
topeka, kansas,USA
May 1999
time: 23:25
  Old Post 18-01-2004 00:58
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Put an end to popups!

Btw, I tried the choice.com thing and the only way it worked was when I put it into the specific scenario and then I could select a civ to play but the game crashed the moment I loaded the scenario so I'm back at step 1

yaroslav is offline yaroslav
Emperor
Madrid, Spain, Europe
Jun 2001
time: 06:25
  Old Post 18-01-2004 01:07
Edit/Delete Message Reply w/Quote
#25 Report this post to a moderator
Support Apolyton buy from Amazon

Berzeker, from your last post I guess you did it well - can you tell what scen was it, what civ did you select?

Berzerker is offline Berzerker
Emperor
topeka, kansas,USA
May 1999
time: 23:25
  Old Post 18-01-2004 01:19
Edit/Delete Message Reply w/Quote
#26 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Seeds of Greatness, babylonians. I put choice in that scenario and finally got the dos prompt to stay up instead of disappearing right away but when I went to start the scenario after choosing the babs the game would go to the title screen and crash

Berzerker is offline Berzerker
Emperor
topeka, kansas,USA
May 1999
time: 23:25
  Old Post 18-01-2004 01:30
Edit/Delete Message Reply w/Quote
#27 Report this post to a moderator
Suffering from ads?

oh, civ 2 mge also. I see Tecumseh is on ToT

yaroslav is offline yaroslav
Emperor
Madrid, Spain, Europe
Jun 2001
time: 06:25
  Old Post 18-01-2004 01:38
Edit/Delete Message Reply w/Quote
#28 Report this post to a moderator
Browse Apolyton AD-FREE

I can't clone the problem - it's working fine for me

At what point do the game actually crash? Do you have the same problem with the other civs?

Berzerker is offline Berzerker
Emperor
topeka, kansas,USA
May 1999
time: 23:25
  Old Post 18-01-2004 04:16
Edit/Delete Message Reply w/Quote
#29 Report this post to a moderator
Remove this text

Yes, all civs act that way. And it crashes at the title picture, the graphics screen for the game.

POTUS is offline POTUS
Prince
How could I possibly not have a Mozambican flag, I mean, what other country has an AK-47 on their flag?
Jul 2003
time: 21:25
  Old Post 18-01-2004 06:41
Edit/Delete Message Reply w/Quote
#30 Report this post to a moderator
Support Apolyton

Java Scripts work on OS X, but you need to remember that Macs use *.pict, not gifs or bmps.

 
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.0711 seconds (92.13% PHP - 7.87% 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