Search found 766 matches

by einstein1969
29 Nov 2019 03:57
Forum: DOS Batch Forum
Topic: Increment a variable with setx
Replies: 4
Views: 587

Re: Increment a variable with setx

Ok! Thanks.
by einstein1969
28 Nov 2019 18:30
Forum: DOS Batch Forum
Topic: Increment a variable with setx
Replies: 4
Views: 587

Re: Increment a variable with setx

but if i check the global environment with another process the variable X is not incremented. Why?
How I can increment a variable over process?
by einstein1969
28 Nov 2019 16:57
Forum: DOS Batch Forum
Topic: Increment a variable with setx
Replies: 4
Views: 587

Increment a variable with setx

Hi to all, I return on this forum after a long time and i not remember how work the dos batch... I use a macro recorder that have a possibility ok run an external command like CMD.EXE or OTHER I need to use a variable and I need to increment this variable. I have probed with setx x 2 cmd.exe /v:on /...
by einstein1969
01 Nov 2018 10:24
Forum: DOS Batch Forum
Topic: Seven segment display
Replies: 2
Views: 977

Re: Seven segment display

Hi Icarus, very nice work!
This is very fast color graphics
by einstein1969
05 Jun 2018 08:44
Forum: DOS Batch Forum
Topic: Dos Batch Math Library
Replies: 59
Views: 23141

Re: Dos Batch Math Library

Hey, I wanted to share something I made last night. I thought maybe this would be useful FIXED! Accuracy is 100% https://gyazo.com/1765c4579c80f2688789b12901d762ad.png @echo off & setlocal enableDelayedExpansion for /l %%a in (1,1,20) do ( set /a "rnd1=!random! %% 49 + 1", "rnd2=!random! %% 49 + 1"...
by einstein1969
04 Jun 2018 08:21
Forum: DOS Batch Forum
Topic: Dos Batch Math Library
Replies: 59
Views: 23141

Re: Dos Batch Math Library

Sorry to dig this up, but I've found use out of this. I was also wondering if it were possible to create a POW macro such as this? Thanks in advanced!! the pow function is reconducible to log function and exp function. pow( x, y ) => exp( y * log( x ) ) I will try to attemp using this article https...
by einstein1969
27 May 2018 16:33
Forum: DOS Batch Forum
Topic: How does this colour Batch script work?
Replies: 4
Views: 1292

Re: How does this colour Batch script work?

The new windows version 10 include more color using VT100 escape sequences The code iterate in HSL colors and convert to RGB and put a color char using escape sequence this code show more colors, use raster fonts 4x6 to get in full screen @echo off & setlocal enabledelayedexpansion mode 260,92 for /...
by einstein1969
03 May 2018 10:08
Forum: DOS Batch Forum
Topic: And now dos batch color secrets?
Replies: 19
Views: 7660

Re: And now dos batch color secrets?

Hi Icarus,

This is great result!!!

Einstein1969
by einstein1969
09 Dec 2017 18:00
Forum: DOS Batch Forum
Topic: timed batch file execution
Replies: 11
Views: 3751

Re: timed batch file execution

You could do something like this: :start if current_time more than 09:00 then notepad.exe wait 1 minute (or wait 24 hours) goto start Saso this? @echo off :label ping 127.0.0.1 -n 2 >nul if %time:~0,2% equ 9 if %time:~3,2% equ 0 ( start notepad.exe ping 127.0.0.1 -n 86398 >nul ) goto label einstein...
by einstein1969
21 Oct 2017 04:21
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 6848

Re: Batch macro vs function call test

I have done the above optimizzation The new gain is about 15% or more for big NumQuads. time is in seconds http://i66.tinypic.com/2czcx14.png the new version include, if defined pidebug variable, print on title with current time and percent achieved. It sync the timer at 00 second before start for e...
by einstein1969
21 Oct 2017 01:35
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 6848

Re: Batch macro vs function call test

I thinks that next step is using multi-thread creating a pipeline... But in the middle there is an optimization in the block of division: AR_Recip/N AR_Recip/N => AR_Recip/(N*N) But this can have an overflow if N*N > 214747 For formulas : Pi = 48*arctan(1/18) + 32*arctan(1/57) - 20*arctan(1/239) and...
by einstein1969
19 Oct 2017 09:27
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 6848

Re: Batch macro vs function call test

I have probed to tuning for best performance the version 4. There are few things to do but I have tried and I have done the follow: - The SET/A is faster if use costant then I have removed the variable @ - Remove unused variables, move at bottom of environment less used variables. N_FORMULA->_FORMUL...
by einstein1969
18 Oct 2017 11:57
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 6848

Re: Batch macro vs function call test

I have compared the last version of mine and your and the original :shock: :shock: :shock: :lol:

time in seconds.
Image

Francesco
by einstein1969
18 Oct 2017 09:44
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 6848

Re: Batch macro vs function call test

Hi Antonio, this version is very efficiency. There is a problem when I press CONTROL-C, the batch don't stop. It's possible break ? Francesco EDIT set /A A_NumGroups = 3 set /A A_NumQuads = NumGroups*25, A_MaxQuadIndex = A_NumQuads-1, @ = 10000 There is an error on A_NumQuads. It uses NumGroup inst...
by einstein1969
15 Oct 2017 07:52
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 6848

Re: Batch macro vs function call test

I have just realized that SET/P is slower than FOR/F this version substitute the precedent. The break even point (BEP) is passed from about 500 NumQuads to about 400 NumQuads. http://i63.tinypic.com/qswo6a.png the new code: @if defined talk (echo on) else (echo off) setlocal EnableDelayedExpansion e...