Search found 105 matches

by IcarusLives
12 Apr 2019 09:17
Forum: DOS Batch Forum
Topic: pass value to string handle function failed
Replies: 8
Views: 226

Re: pass value to string handle function failed

sincos2007 wrote:
12 Apr 2019 04:02
Hi IcarusLives,

Could you show me how to expand !count_of_chars! inside ()?

Thanks

Code: Select all

 call echo %%input_line:~0,!count_of_chars!%%
 
 or
 
 for %%i in (!count_of_chars!) do echo !input_line:~0,%%i!
by IcarusLives
11 Apr 2019 23:58
Forum: DOS Batch Forum
Topic: pass value to string handle function failed
Replies: 8
Views: 226

Re: pass value to string handle function failed

hi Steffen, I have test the code you post, it really works. Thanks. There is another code related to this topic which not work: :test4 echo on setlocal EnableDelayedExpansion set "input_line=1234567" set "n=1" for /l %%i in (1,1,7) do ( set "count_of_chars=!n!" echo !input_line:~0,%count_of_chars%!...
by IcarusLives
28 Mar 2019 07:07
Forum: DOS Batch Forum
Topic: Need help with a game
Replies: 2
Views: 162

Re: Need help with a game

One important thing to remember is that batch scripts run from top to bottom. I want the text of your answer to be echo just after the "Me: ", now it is just marking 1. The other thing is that I want the all "Answers choice" part to be deleted. You need to remember that you have not mapped an array ...
by IcarusLives
04 Mar 2019 13:27
Forum: DOS Batch Forum
Topic: Cardioid - Heart Curve
Replies: 6
Views: 402

Re: Cardoid - Heart Curve

Aacini wrote:
04 Mar 2019 09:14
Interesting!
Thank you for thinking so! And thank you for rewritting a OS friendly version!
by IcarusLives
04 Mar 2019 13:26
Forum: DOS Batch Forum
Topic: Cardioid - Heart Curve
Replies: 6
Views: 402

Re: Cardoid - Heart Curve

I have never heard of a "cardoid". Did you mean "cardioid"? That shape is not a cardioid because it has two cusps, where as a true cardioid has one cusp. If the bottom was rounded instead of having a point then it could be a cardioid. Haha, yes that is what I meant. Thank you! https://upload.wikime...
by IcarusLives
04 Mar 2019 08:09
Forum: DOS Batch Forum
Topic: Cardioid - Heart Curve
Replies: 6
Views: 402

Cardioid - Heart Curve

Just wanted to share something neat I found. http://mathworld.wolfram.com/HeartCurve.html I attempted to recreate this in batch. Here is my attempt. The algorithm is correct. This is the 6th example. I tried to "fine tune" the heart to appear more.. hearty..? A deeper point in the top would be nice,...
by IcarusLives
06 Feb 2019 23:41
Forum: DOS Batch Forum
Topic: Dos Batch Math Library
Replies: 59
Views: 17774

Re: Dos Batch Math Library

How can we conjure up a a couple of math macros for this thread? I really don't know how... but... tan() atan() atan2() These would be extremely useful! (at least to me they would be..) And I would really love to learn the math behind it if anyone could explain it or point me in the right direction ...
by IcarusLives
25 Dec 2018 09:24
Forum: DOS Batch Forum
Topic: For /f processing delimited string
Replies: 4
Views: 349

Re: For /f processing delimited string

You want something like this...? @echo off & setlocal enableDelayedExpansion for /f "tokens=1-2 delims=?" %%a in ("echo?set") do ( for /l %%c in (1,1,10) do ( %%b /a "a[%%c]=!random! %% 2" %%a %%c = !a[%%c]! ) ) pause & exit I couldn't manage to get commands like for and if to work in this instance....
by IcarusLives
25 Nov 2018 21:30
Forum: DOS Batch Forum
Topic: Need help understanding this parsing method???
Replies: 2
Views: 311

Need help understanding this parsing method???

Hello everyone Has anyone heard from einstein1969? I have a script he wrote, and as I'm looking through the code I find something I don't quite understand, and was hoping someone could explain it to me. Here is einstein1969's Heartbeat.bat, works perfectly fine here on win10. @echo off setlocal Enab...
by IcarusLives
13 Nov 2018 13:45
Forum: DOS Batch Forum
Topic: Strange behaviour with ansi sequence
Replies: 3
Views: 474

Re: Strange behaviour with ansi sequence

ECHO is providing CRLF so use this instead.

Code: Select all

<nul set /p "=%esc%[100m"
by IcarusLives
01 Nov 2018 16:13
Forum: DOS Batch Forum
Topic: My batch Menu
Replies: 9
Views: 1049

Re: My batch Menu

I agree with Squashman. At this point you're not learning anything anymore, you're just making a bit of a mess. The code can be made substantially shorter.
by IcarusLives
01 Nov 2018 10:41
Forum: DOS Batch Forum
Topic: Seven segment display
Replies: 2
Views: 519

Re: Seven segment display

Yes! Unfortunately it relies on the windows 10 VT100 escape sequences so this will not work for any windows version below that.. :(
by IcarusLives
01 Nov 2018 08:42
Forum: DOS Batch Forum
Topic: Seven segment display
Replies: 2
Views: 519

Seven segment display

Hello all ^-^ WINDOWS 10 ONLY!!! https://gyazo.com/8d7977a62bd17208150206ffbaec47b0.gif The usage is very simple call :sevenSegmentDisplay index color X Y Example: call :sevenSegmentDisplay 3 10 8 8 Which means basically Display number 3, color is 10, x = 8 y = 8 Enjoy! THIS CODE RELIES ON %PLOT% wh...
by IcarusLives
07 Sep 2018 14:20
Forum: DOS Batch Forum
Topic: Center Window and Move Window (yet more Powershell hybrids)
Replies: 6
Views: 1382

Re: Center Window and Move Window (yet more Powershell hybrids)

I love the move window macro! This is great, thank you very much for this.

I also respect how short and concise it is.

Both working Win 10 64bit
by IcarusLives
07 Sep 2018 07:08
Forum: DOS Batch Forum
Topic: Center Window and Move Window (yet more Powershell hybrids)
Replies: 6
Views: 1382

Re: Center Window (yet another Powershell hybrid)

Haha, I guess you've got a point! No, this script is great! Thank you very much for this release.