All the latest versions of windows have built in support for vbscript (.vbs) as an alternative to .bat files. VBScript gives you far more control and powerful facilities than was ever available via the .bat file syntax
Dave -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tony Firshman Sent: 16 September 2007 23:58 To: [EMAIL PROTECTED] Subject: Re: [Ql-Users] batch file -----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 _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
