Search found 871 matches

by jeb
01 Aug 2018 06:12
Forum: DOS Batch Forum
Topic: Reading a hidden password via a FINDSTR bug
Replies: 10
Views: 338

Re: Reading a hidden password via a FINDSTR bug

Works fine on my Win7 x64 Professional. I'm astonished at the findstr redirection to CON. I didn't expected any color effects for redirected text to CON at all, I expected to see control codes like for CLS > CON I saw this effect before, when I build the findstr color technic, but I always assumed t...
by jeb
25 Jun 2018 07:13
Forum: DOS Batch Forum
Topic: Change the influence of one batch file when other one is running
Replies: 3
Views: 286

Re: Change the influence of one batch file when other one is running

two.bat

Code: Select all

@echo off
call :secretLabel
exit /b

:secretLabel
one.bat
Obviously 8) , this will start :secretLabel in one.bat

You don't need to start one.bat before
by jeb
18 Jun 2018 11:32
Forum: DOS Batch Forum
Topic: Line read in a loop from a file doesn't assign properly in batch program
Replies: 2
Views: 205

Re: Line read in a loop from a file doesn't assign properly in batch program

Hi jrahman, I closed your question on StackOverlflow as it is a duplicate of Variables in batch not behaving as expected . There is explained why your echo %testCaseName% fails. Percent expansion is evaluated when a block is parsed, before it will be executed. So in your sampe %testCaseName% is expa...
by jeb
13 Jun 2018 00:43
Forum: DOS Batch Forum
Topic: Dateien verbinden und / Fehler bei Inhalte suchen
Replies: 2
Views: 198

Re: Dateien verbinden und / Fehler bei Inhalte suchen

Hi FireBuff, the language for this forum is english, it would be polite to translate your question. Like Newbee wrote, I suppose the problem is not in your code. Instead it's probably that findstr simply finds two lines with "VV011". You could test this, add /N to findstr ("findstr /N ...") this wil...
by jeb
28 May 2018 23:00
Forum: DOS Batch Forum
Topic: How to mask a blank inside nested quotes?
Replies: 11
Views: 523

Re: How to mask a blank inside nested quotes?

Hi pstein,

as sst said, it's a problem how FOR/F invokes cmd.exe.
It can be solved with the additional quotes like the sample of sst.

Or you prefix your command with CALL

Code: Select all

for /F usebackq %%L in (`CALL "%PROG%myprog.exe" ...... %%F`) do set %%L
by jeb
25 May 2018 02:32
Forum: DOS Batch Forum
Topic: Get arguments without temporary file
Replies: 24
Views: 1113

Re: Get arguments without temporary file

@JanAntonin I'm missing the part where the arguments are transfered to a variable. @Ed Dyreen I optimized the code a bit for macronisation, remove labels, findstr. That looks quite good, BUT to remove the findstr after 'doskey /macros' isn't a good idea, as it sets any amount of variables, for each ...
by jeb
22 May 2018 23:46
Forum: DOS Batch Forum
Topic: Get arguments without temporary file
Replies: 24
Views: 1113

Re: Get arguments without temporary file

It doesn't seem to like spaces in current directory. :( Stupid jeb code, we always needs to fix stupid jeb code :evil: Yes, and I'm the first one who criticize such sloppy code :( But beside that bugs I tested with line feeds and it suprises me, as line feeds are converted to ampersands. @ech off s...
by jeb
22 May 2018 15:04
Forum: DOS Batch Forum
Topic: Get arguments without temporary file
Replies: 24
Views: 1113

Re: Get arguments without temporary file

I think you are on the right way. But I can't understand why you parse the options before launching the test script? Why you don't use it simply calling like GetParam.bat %*? The problem for the unittest is the fact, that I don't know a simple way to show the argument that will be used and use that...
by jeb
22 May 2018 12:48
Forum: DOS Batch Forum
Topic: Get arguments without temporary file
Replies: 24
Views: 1113

Re: Get arguments without temporary file

I build a small unittest with different more or less complex arguments. @echo off setlocal DisableDelayedExpansion set "destBatch=GetParam.bat" set "arg1=simple text" set "arg2=special unquoted &|<>%%!^#" set ^"arg3=special quoted "&|<>%%!^#"" set "arg4=&"^&" set "arg5=caret^"caret2^^.." set "arg6=^...
by jeb
22 May 2018 11:51
Forum: DOS Batch Forum
Topic: Get arguments without temporary file
Replies: 24
Views: 1113

Re: Get arguments without temporary file

Hi penpen, really stupid bug. I simply forgot the exclamation marks. It can be fixed by moveing the setlocal EnabledelayedExpansion behind the "pipe-block". @echo off for /F "tokens=3 delims=:" %%F in ("%~0") do goto %%F :getParam setlocal DisableDelayedExpansion (set LF=^ %=empty=% ) > nul break | ...
by jeb
22 May 2018 07:17
Forum: DOS Batch Forum
Topic: Get arguments without temporary file
Replies: 24
Views: 1113

Get arguments without temporary file

Hi, after the claim of Jan Antonin, I take a closer look at the problem and I found a nearly simple method My biggest (not from the pragmatic point of view of course) contribution which I am really proud of will be an ultimate method of obtainig all command line arguments of a sript inside from the ...
by jeb
22 May 2018 03:16
Forum: DOS Batch Forum
Topic: Length of a string - my first contribution
Replies: 4
Views: 258

Re: Length of a string - my first contribution

Hi Jan, like sst I'm interessted in this part. My biggest (not from the pragmatic point of view of course) contribution which I am really proud of will be an ultimate method of obtainig all command line arguments of a sript inside from the script of course. With no compromise, without any temp file....
by jeb
18 May 2018 02:24
Forum: DOS Batch Forum
Topic: Discussion about jeb's batch parsing rules on StackOverflow
Replies: 42
Views: 3494

Re: Discussion about jeb's batch parsing rules on StackOverflow

Related to a comment from aschipf at stackoverflow: Phase 7.1: I think it would be worth mentioning that for the special set semantics set "name=content" ignored the command extensions need to be enabled, otherwise a syntax error arises: what do you think, @dbenham or @jeb? In my opinion, the SET-sy...
by jeb
19 Apr 2018 13:15
Forum: DOS Batch Forum
Topic: Strange for loop behaviour
Replies: 3
Views: 311

Re: Strange for loop behaviour

Hi penpen, I'm a bit puzzeled about what result you expect. :?: I'm not really surprised, that you always get i=1 I simplyfy your code a bit, trying to build a minimal example. I first removed the timestamp stuff and the variable x and also the %% 4 set "loadColors=(set "i=0" & (for %%a in (!table!)...
by jeb
16 Apr 2018 17:39
Forum: DOS Batch Forum
Topic: Parallax background, and overlapping images properly
Replies: 11
Views: 786

Re: Parallax background, and overlapping images properly

I used your sample files cloud1.ppm and mountain1.ppm. This batch demo shows that you can overlay two different images in real time (7 FPS). I'm using pre cached files to avoid the long converting time from RGB to escape sequences. And for combining two images, I precompute a run length encoded arra...