.BAT file problem.

Request patches for Keens 1-3.
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

.BAT file problem.

Post by levellord »

Could someone in the know about .BAT files tell me what command you use to run TWO programs at once.

(Normally when a .BAT file is told to run a program it transfers control to that program, the command prompt must be clicked again to start the second program.)
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Is that kind of thing even possible with normal DOS commands?
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

re: batches in DOS

Post by XkyRauh »

So far as I know, not even Windows or MacOS truly run two programs at once... they focus on one program and keep activity happening in the background. But that's just like running around the room and checking on various items (fridge, tv, microwave... fridge, tv, microwave) a thousand times a second. You're not really checking all 3 things at once--you're just doing 'em one at a time really fast!

That being said, I don't think that DOS has even THAT capability. A batch file, to the best of my knowledge, is just an itenerary for your room-checking madness. Your batch file will lay out that you want to check the fridge, then the tv, then the microwave, then run down the hall and check on the washing machine before going back to the tv. It may do all of those very fast, in under a second, but it can't go back to the start. It can't loop. --And what that means is that the batch file will run everything in your list, one at a time, and then finish each item before moving on to the next. No two-at-once... but you can do two-in-a-row!

I suppose the closest you can come to running two things at once in DOS would be the CKxPatch things--they run both themselves and the Keen# executable 'at the same time' ... hehe ;-)

--Xky
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Ah, sorry, no you misunderstand.

Windows runs a program in the background, but I can be say playing a Keen game and hear when the movie I was downloading has finnished. (It was running in the background, but was still working the speakers, i.e there were TWO programs acessing the speakers at once.)

.BAT files transfer control completely over to a program; unless that program has specific instructions to exit to that specific .BAT file, the program will exit to windows and the other programs you wanted going won't run.

For instance, one .BAT file can patch 2 Keen mods one after the other. IF the first Keen mod returns to the command prompt insted of windows, and will run both (one in the background) if one minimizes the first Keen mod and clicks the .BAT files window.

I need a file that will run one program in the background without all that clicking.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Let me guess, you want to have background mids to your Keen mod or something? ;)
User avatar
JosephBurke
Posts: 94
Joined: Sun Aug 31, 2003 9:51 pm

bat files

Post by JosephBurke »

You can have a BAT file start a new dos window, in this way you can have it start two programs at once; one running in each window. I'd go find out how but my PC isn't working right now.
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Let me guess, you want to have background mids
mids?, like music?, now theres an idea.
Keen mod or something? ;)
Keen mod? I think first I'll master the patching tricks :)
User avatar
CheesyDave
Posts: 19
Joined: Mon Sep 15, 2003 4:07 pm
Location: San Diego
Contact:

start's the word

Post by CheesyDave »

well, i was kind of hoping that my first post would be my mod, but i'm a greedy little boy when it comes to kudos ... as for the bat stuff... omg am teh 1337 dos h@x, so here we go... plz type the following:
<win>
r
cmd<enter>
edit twoprogz.bat<enter>
start %1<enter>
start %2
<alt>
<up>
<up>
<enter>
exit<enter>
cake, right? so then you make a shortcut to twoprogz.bat with command line:
/path/twoprogz.bat first.bat second.bat
... so you end up with three dos windows: twoprogz, %1, and %2... each with their own process so they pretend like they're going at the same time. if you want to have music playing, i'd suggest winamp, which accepts a list of files to play as parameters at the prompt. make a bat with:
/path/winamp.exe midifile.mid wavfile.wav mp3stuff.mp3
whatever floats your wagon or paints your boat, so to speak. only problem is that each path will prolly be different on each computer. you could write a bat script to accept the paths at parameters, but tha'd just be rediculous. there are ways around this, but i have to get back to work... so i guess i'll send my mod to mr. durdin with a request late tonight or tomorrow morning. hopefully in time for keen awards ~.^ g'night all ~
User avatar
CheesyDave
Posts: 19
Joined: Mon Sep 15, 2003 4:07 pm
Location: San Diego
Contact:

Exit is a good word too!

Post by CheesyDave »

jus wanted to add ... if you don't want to leave all those windows hanging, add an "exit" to the end of your bat files. the twoprogz.bat will end right after opening the two windows, you prolly won't even see it open. if you're starting winamp, make a bat with winamp on one line and exit on the next. the second.bat can be your assemblemod.bat file. ~
User avatar
JosephBurke
Posts: 94
Joined: Sun Aug 31, 2003 9:51 pm

Host ... it?

Post by JosephBurke »

CheesyDave: i'll send my mod to mr. durdin with a request late tonight or tomorrow morning.
What kind of request, to host it? If you want, you can send it to other people too. People like Xtraverse and myself are around more often than him, keeping that in mind it'll be up sooner if you send it to all three of us.

The email addresses you'll need to know are.

xtraverse at spatang dot com
andy at durdin dot net
bishop at lastplain dot com
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

A new mod, ah! :) Can't wait to get playing it..
By the way, could I put it on my site too when it is released?
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Thanks!

tz hrd 2 no wot ur saying if ur tlkn x8 'n txt; j'no wt Imn?

The path problem is easy enough to fix.

Problem: not everyone has winamp, or the right settings, but you should put music in your mod; with winamp set to 'repeat' it will play just like game music


Just wanted to add; you can edit a post you've made instead of posting a new reply.
"Now you miss me, don't you ? You miss me!! Perhaps I was only in black and white, but I worked !! Exactly, I worked!! Bastards..." DOS

"Here's your mail for today... Spam, spam, spam and spam... And oh ! A chain letter !" Outlook Express

"Who's the funny guy who's running a bug-free version of windows? Want to ruin the trade or what ?" Bill Gates
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Post by ckguy »

*agrees entirely with levellord*

DOS does work much better that Windows ... I've had practically no troubles with it.
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Ahh, DOS.

Post by CommanderSpleen »

DOS does work much better that Windows ... I've had practically no troubles with it.
I must agree. Plus the multitasking nature of Windows has a tendency to induce distractions from a main component of a project. At least, that's what I find.

A couple of weeks ago, my faithful PIIzza crashed... or, at least, it seemed that way. Windows kept crashing when attempting to load particular DLLs (ie. nearly any). I reformatted, and everything was cruising along for a day or two, then the same thing happened again... I tried reformatting once more, but the installation kept crashing on me. I tried a new HDD, emptying the PCI/ISA slots, and switching the RAM for an identical quantity from my collection... but to no avail.

So it sat there for a couple of days, or a week... I don't recall now--it's been a long year. After perusing the Isis II source code, and indeed actually playing the demos, I decided I wanted a dedicated DOS programming computer... so I set up FreeDOS and DJGPP/Allegro. Everything functions smoothly, and the PIIzza is functioning brilliantly, except that I haven't been able to work out how to use NetWare Lite to set it up on the LAN... and of course there are a few recurring errors taking place due to the adjustment process to FreeDOS--it seems there's some tweaking to be done yet.

Anyway... back to the subject...

That batch file script may come in handy some day... using it to play music would be very useful... a TSR'd be more handy for that purpose, for shortcut keys that operate a playlist in the background.

One thing that I've often wondered these past months is whether variables from Keen 1-3 can be read through a TSR so as to play different music when in different levels and such. I doubt it, but it'd rock.

If it could be done without using up too much conventional memory (can TSRs be loaded into protected mode?), the former would be cool.

>Commander Spleen
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Arm.

Post by CommanderSpleen »

Bah. Way to speak too soon, Spleen. PIIzza has crashed entirely. The display kept screwing over every time I tried to do stuff, and then it started doing it at startup, and now even after taking out all the hard drives and so forth, it turns defunky as soon as the power is turned on.

Joy.

>Commander Spleen
Post Reply