Search found 211 matches

by thefeduke
12 Nov 2016 18:31
Forum: DOS Batch Forum
Topic: Check input arguments for a particular keyword
Replies: 3
Views: 3492

Re: Check input arguments for a particular keyword

The meat is really in my previous post, but I noticed an interesting possibility in re-using the "parm" string above. A side effect of this "special argument format" approach is that arguments can clutter the environment with any kind of unpredicted variables. The clearing of all...
by thefeduke
12 Nov 2016 13:24
Forum: DOS Batch Forum
Topic: Check input arguments for a particular keyword
Replies: 3
Views: 3492

Re: Check input arguments for a particular keyword

@penpen, thanks for the pointer. It aimed at the topic itself, so I saw Antonio's post first. I adapted that to suit me, but "IN (%*)" ignores strings with "?"s so it needed a little poison fiddling. The code follows later in this post and extends the limitation of nine arguments...
by thefeduke
11 Nov 2016 12:40
Forum: DOS Batch Forum
Topic: Check input arguments for a particular keyword
Replies: 3
Views: 3492

Check input arguments for a particular keyword

Aacini wrote: set "vars=apl1=2,apl2=,apl3=kup,aplN=etc" set "%vars:,=" & set "%" Brilliant! I thought so, too. I recall the aggravation of interpreting arguments while using SHIFT, which intrudes on the order of things, by definition. Here is a non-intrusive quick ...
by thefeduke
14 Oct 2016 23:13
Forum: DOS Batch Forum
Topic: %errorlevel% expansion within subroutine
Replies: 6
Views: 6553

Re: %errorlevel% expansion within subroutine

Perhaps the behavior is more related to being within an IF statement than being in a subroutine.

John A.
by thefeduke
25 Sep 2016 12:41
Forum: DOS Batch Forum
Topic: Is this possible
Replies: 36
Views: 24825

Re: Is this possible

A few changes I would like to see maybe change the size of the command prompt but make it look nicer at least The mode command is useful there. type mode /? for the help screen. The display mode is the line to pay attention to. Good advice. I had a buffer line of 120. Look around the properties of ...
by thefeduke
21 Sep 2016 23:21
Forum: DOS Batch Forum
Topic: How to be sure selected drive is removable or not?
Replies: 15
Views: 10395

Re: How to be sure selected drive is removable or not?

I used some of the above and posted the following elsewhere at http://www.dostips.com/forum/viewtopic.php?p=49195#p49195 . It kind of leads to finger problem correction: As it happens I was working on something similar with many good ideas from Post subject: "Re: check if a removable drive exis...
by thefeduke
21 Sep 2016 17:27
Forum: DOS Batch Forum
Topic: Batch file, prompt drive letter
Replies: 3
Views: 3215

Re: Batch file, prompt drive letter

As it happens I was working on something similar with many good ideas from Post subject: "Re: check if a removable drive exists before running". I came up with this: @echo off SetLocal set folder="x:\" :: first argument to override previous set command If /i "%~1" NEQ &...
by thefeduke
15 Sep 2016 13:04
Forum: DOS Batch Forum
Topic: Is this possible
Replies: 36
Views: 24825

Re: Is this possible

if you can make it then go ahead and attempt it I got some of it into the following code, but, sorry, it took a bit longer than I wished. Here it is with remaining bugs intact. I shall follow with some comments on how you appear to be avoiding the use of CALL leading to hard to manage code with GOT...
by thefeduke
10 Sep 2016 07:24
Forum: DOS Batch Forum
Topic: Is this possible
Replies: 36
Views: 24825

Re: Is this possible

Edited previous post:

Code: Select all

Set /A "LoadLimit=1+LoadLimit/3"

John A.
by thefeduke
09 Sep 2016 18:51
Forum: DOS Batch Forum
Topic: Is this possible
Replies: 36
Views: 24825

Re: Is this possible

I shall apply my code changes to your second last code block. and post them. Have a good weekend. I tried to give you a solid visual framework within which you can add your wish list. I think that I got the fixes in and I moved things around to improve when things get initialized and reset. I mangl...
by thefeduke
09 Sep 2016 01:59
Forum: DOS Batch Forum
Topic: Is this possible
Replies: 36
Views: 24825

Re: Is this possible

and if we could clean up the code that makes it change colors as you get closer or farther from the number that would be great because its not 100% functional I found a typo in what I gave you. if %guess% GTR %answer% Colorshow /%MDSS% " Lower!" 13 10 /0C "%down%" 32 should have...
by thefeduke
08 Sep 2016 14:07
Forum: DOS Batch Forum
Topic: Is this possible
Replies: 36
Views: 24825

Re: Is this possible

Stepping back in time: Hay I Made a small change making it so the highest number is 100 Had you introduced this change to your ramdomizer at that time Set /A "answer=(%random%*100)/32768+1" You would have saved considerable effort doing your "///LOADING///" loop. It does seem to ...
by thefeduke
07 Sep 2016 15:44
Forum: DOS Batch Forum
Topic: Is this possible
Replies: 36
Views: 24825

Re: Is this possible

also is it possible to only allow the entrance of numbers from 1-100 when you a guess a number so you can only guess 1-100 For that, I refer you to http://www.dostips.com/forum/viewtopic.php?p=44274#p44274 where Antonio wrote Although ReadFormattedLine subroutine works perfectly, the code is somewh...
by thefeduke
07 Sep 2016 15:08
Forum: DOS Batch Forum
Topic: Read key presses via REPLACE - New functions :getKey, :getAnyKey, :getMaskedInput
Replies: 24
Views: 24741

Re: Read key presses via REPLACE - New functions :getKey, :getAnyKey, :getMaskedInput

I've fixed the two routines and modified the version to 1.1 in my first post. It seems that a minor bug came in with the documentation. There is no longer a :getkey label. Neither of these candidates are a valid target: ::getKey KeyVar [ValidVar] :: :: :get key set "%1=" BTW, I added some...
by thefeduke
07 Sep 2016 10:00
Forum: DOS Batch Forum
Topic: Is this possible
Replies: 36
Views: 24825

Re: Is this possible

Hey I got it to work but the command colorbox didn't work and the colors don't change correctly some times and I still want to add the new colors in The most recent exact download instructions are in a very recent post in the same topic: http://www.dostips.com/forum/viewtopic.php?p=48090#p48090 Aga...