[Ql-Users] batch file

2007-09-16 Thread Dilwyn Jones
I need some help to create a little DOS batch file to select QL 
emulators.

My flash memory drive has QPC, QemuLator and QLay on it, so I need to 
write a short batch file to select which one to start. Something in 
dos along the lines of:

CLS
PRINT'1-QPC2'
PRINT'2-QemuLator'
PRINT'3-QLay'
INPUT'Which one ';choice$
IF choice$ = '1' then ex \qpc2\qpc2.exe
IF choice$ = '2' then ex \Q-emuLator\QemuLator.exe
IF choice$ = '3' then ex \qlay2\qlay2.exe

Which would probably involve some echo commands etc, but I don't know 
how to ask for input in dos.

-- 
Dilwyn Jones

___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] batch file

2007-09-16 Thread Tony Firshman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dilwyn Jones wrote:
 Correct, it's not supported in Win XP at least. Shame, choice was a
 good option to use. I saw how to use it in a batch files tutorial
 online and so much of that tutorial seemed to only apply to real
 DOS, not the pretend one in Win XP. Any other way of asking the user
 to press a key? - I understand what errorlevel does and how to goto
 menus and so on, so any way of asking for a selection would be great.
 
 I hope to be able to use relative paths so that I can try to make the
 batch files work from the current directory where it's started from to
 start the relevant emulator, to work around the problem that you can't
 predict which drive letter the user's computer will assign to the USB
 drive.
 
 e.g. if the batch file qlay.bat is in the root and qlay2.exe is in a
 directory called \qlay2\ then this should (I hope, not tried it yet)
 start qlay2.exe, and I'll try to configure the emulators to look for
 their file systems via a relative directory too:
 
 \qlay2\qlay2.exe
 
 The only other way I can think of asking for user input is to use SET 
 with the /P option, but I don't know if this works with older DOSes or 
 not (I might raid my wife's laptop in a minute to find out as that has 
 Win 98 on it):
 
 SET choice=
 SET /P choice=Select option 1 to 4
 
Whoops - I did mean 'choice' - mistyped.
Brilliant figuring *that* out (8-)#
I see that is not available on NT (on which XP is based).
Sorry.
This URL gives a solution:
http://tinyurl.com/2p8xj8

(PMChoice.bat and the execable PMChoice.kix)

Not nearly as good as 'choice' which I used a lot in the early days.

It would be easy to write a utility in another language - perl is a good
one to learn!


Tony
- --
QBBS (QL fido BBS 2:257/67) +44(0)1442-828255
   [EMAIL PROTECTED] http://firshman.co.uk
Voice: +44(0)1442-828254 Fax: +44(0)1442-828255 Skype: tonyfirshman
TF Services, 29 Longfield Road, TRING, Herts, HP23 4DG
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG7bTxM3RzOs8+btoRAuMXAJ4/qqVUSjZ/LGdN5UJuUlc1UuzsLgCfWewW
HVrgzfmmeDZN0H+tXeF/bDo=
=IO14
-END PGP SIGNATURE-
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] batch file

2007-09-16 Thread Timothy Swenson
I remember a while back there were some DOS menu system available as 
freeware or shareware.  You might look into something like this as it 
would be little nicer than just some DOS text.  I think the old SIMTEL20 
system has a bunch of DOS free/shareware.

If just DOS only, using graphics characters, you can create a menu 
system.  Did this about 20 years ago, so I don't know if the graphics 
characters (above 127) will work in the newer DOS boxes in XP.

Tim Swenson
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm