Search found 43 matches

by Thor
16 Mar 2017 15:14
Forum: DOS Batch Forum
Topic: how to use code to create a Pyramid
Replies: 30
Views: 19467

Re: how to use code to create a Pyramid

Based on Aacini's triangle method, I've come up with these 2 batch files: "two_triangle.bat" @echo off setlocal EnableDelayedExpansion set "rows=17" set "spaces=" set "letters=A" for /L %%i in (1,1,%rows%) do set "spaces=!spaces! " for /L %%i in (1,1...
by Thor
13 Mar 2017 11:21
Forum: DOS Batch Forum
Topic: How to center align text.
Replies: 30
Views: 28457

Re: How to center align text.

"Aacini 1" (Your previous method)

Start time: 10:17:44.05
End time: 10:17:44.73
Difference: 0.68

==========================
"Aacini 2" (Your latest method)

Start time: 10:17:44.86
End time: 10:17:45.26
Difference: 0.40

I'm very impressed with your latest discovery. :D
by Thor
12 Mar 2017 17:37
Forum: DOS Batch Forum
Topic: How to center align text.
Replies: 30
Views: 28457

Re: How to center align text.

This is the result I've got when running the script to display a 1500 lines of text. This is to arrange in fastest time first order. "Aacini" Start time: 16:12:08.28 End time: 16:12:08.97 Difference: 0.69 =========================== "aGerman" Start time: 16:12:05.96 End time: 16:...
by Thor
12 Mar 2017 01:20
Forum: DOS Batch Forum
Topic: How to center align text.
Replies: 30
Views: 28457

Re: How to center align text.

Thanks Jer for the clarification and added the "indent" feature. The other scripts from aGerman, Sounak@9434, einstein1969, Aacini, ShadowThief all work fine. It's amazed me to see lots of methods to do the same thing, which is to display centered text on screen. It reminds me about an old...
by Thor
10 Mar 2017 18:04
Forum: DOS Batch Forum
Topic: How to center align text.
Replies: 30
Views: 28457

Re: How to center align text.

Ok then I misinterprete the "sizemax" meaning with "max screensize" window meaning. :mrgreen:
by Thor
10 Mar 2017 15:55
Forum: DOS Batch Forum
Topic: How to center align text.
Replies: 30
Views: 28457

Re: How to center align text.

Center aligning to a fixed length is good to know. Here is an adaptation of that combined with other methods I have learned from this forum's participants. Post your comments if you find any part of this code needs correction or could be improved in some way. @echo off setlocal set "sourcefile...
by Thor
20 Feb 2017 15:07
Forum: DOS Batch Forum
Topic: Using many "tokens=..." in FOR /F command in a simple way
Replies: 59
Views: 83812

Re: Using many "tokens=..." in FOR /F command in a simple way

Hi Antonio, I've used your latest ""FOR-F with many tokens - SP.bat" file and change the codepage to 850 and it works flawlessly. Don't know why. tokens=170-180 A170 A171 A172 A173 A174 A175 A176 A177 B170 B171 B172 B173 B174 B175 B176 B177 C170 C171 C172 C173 C174 C175 C176 C177 toke...
by Thor
18 Feb 2017 14:07
Forum: DOS Batch Forum
Topic: Using many "tokens=..." in FOR /F command in a simple way
Replies: 59
Views: 83812

Re: Using many "tokens=..." in FOR /F command in a simple way

Hi Antonio, Good news, it runs now But I've got the following results: tokens=21 A21 B21 C21 tokens=51 A51 B51 C51 tokens=81 A81 B81 C81 tokens=85 A85 B85 C85 tokens=86 ECHO is off. ECHO is off. ECHO is off. tokens=98 ECHO is off. ECHO is off. ECHO is off. tokens=99 %Ä %Ä %Ä tokens=100 %Å %Å %Å toke...
by Thor
18 Feb 2017 11:26
Forum: DOS Batch Forum
Topic: Using many "tokens=..." in FOR /F command in a simple way
Replies: 59
Views: 83812

Re: Using many "tokens=..." in FOR /F command in a simple way

Hi Antonio,

I've run your batch file and at the "tokens=" prompt, I've entered "21" (without quotes) and I've got an error like this:
tokens=21
% was unexpected at this time.
by Thor
20 Dec 2016 13:29
Forum: DOS Batch Forum
Topic: SendMessage.exe: Access to advanced Windows features
Replies: 19
Views: 24081

Re: SendMessage.exe: Access to advanced Windows features

Thank you very much, I didn't know about that page.
It works as expected now. :P
by Thor
20 Dec 2016 11:03
Forum: DOS Batch Forum
Topic: SendMessage.exe: Access to advanced Windows features
Replies: 19
Views: 24081

Re: SendMessage.exe: Access to advanced Windows features

Thanks for the useful tool.
I have a question regarding the use of the "Calculator" in "UseCalc.bat".
How could you define a key to use the "factorial" function, i.e. "n!"?
I want to calculate "5!"
by Thor
06 Nov 2016 21:04
Forum: DOS Batch Forum
Topic: Foxidrive has left us
Replies: 42
Views: 184014

Re: Foxidrive has left us

Eventually...everyone will come to the end of the tunnel.
Rest in peace bro.
by Thor
28 Oct 2016 17:59
Forum: DOS Batch Forum
Topic: Batch Script to make ColorShow Checkerboards
Replies: 10
Views: 8028

Re: Batch Script to make ColorShow Checkerboards

You've right. I've forgot about the /w and /h switches which could increase and decrease the width and height. Sorry for such an awkward request. :oops:
by Thor
28 Oct 2016 06:14
Forum: DOS Batch Forum
Topic: Batch Script to make ColorShow Checkerboards
Replies: 10
Views: 8028

Re: Batch Script to make ColorShow Checkerboards

Could you make the "a" and "d" switches to have different sizes? Like "small" "medium" "large" instead of only one size like right now?
by Thor
27 Oct 2016 19:52
Forum: DOS Batch Forum
Topic: Batch Script to make ColorShow Checkerboards
Replies: 10
Views: 8028

Re: Batch Script to make ColorShow Checkerboards

Thanks Jer, the problem has been fixed now.