Search found 458 matches

by misol101
10 Jun 2020 14:13
Forum: DOS Batch Forum
Topic: Cmdwiz - 54 operation cmd helper tool (now with Unicode)
Replies: 48
Views: 26402

Re: Cmdwiz - 52 operation cmd helper tool (now with Unicode)

Release of version 1.5 (link in first post) What's new: 1. The sendkey operation now allows sending an entire "string" instead of a single virtual key code. This makes it a lot easier to use. For example,in the example script automation-cmdwiz.bat : ::Previous: cmdwiz sendkey 0x10 d & cmdwiz sendke...
by misol101
09 Jun 2020 17:03
Forum: DOS Batch Forum
Topic: Atan?
Replies: 5
Views: 1228

Re: Atan?

Here is a crude estimation of atan, based on the second answer at https://math.stackexchange.com/questions/1098487/atan2-faster-approximation . I also had to handle the case where y is 0. This could be improved upon in many ways, but it is acceptable for what I needed it for. @echo off rem Calculate...
by misol101
09 Jun 2020 12:23
Forum: DOS Batch Forum
Topic: Atan?
Replies: 5
Views: 1228

Atan?

Anybody happen to be sitting on an atan or atan2 batch macro? This is the best I got at the moment: atan2.js: WScript.Echo(Math.floor(Math.atan2(WScript.Arguments.Item(0),WScript.Arguments.Item(1))/Math.PI*180)) batch script: cscript //nologo //e:javascript "atan2.js" !TXE! !TZE! >res.txt set /p ERY...
by misol101
09 Jun 2020 06:15
Forum: DOS Batch Forum
Topic: Cmdgfx - draw 3d and graphic primitives (polygons,circles etc) in cmd window (now with 24-bit RGB support!)
Replies: 119
Views: 79290

Re: Cmdgfx - draw 3d and graphic primitives (polygons,circles etc) in cmd window (now with 24-bit RGB support!)

VoodoGuito: Without the use of any exes, or only with exes that come packaged with Windows? Pretty much any command you run is an ”exe”, you know... Anyway, since you probably mean ”without external exes”, the answer is: yes, you can. That’s not the topic here though, I suggest starting a new thread...
by misol101
08 Jun 2020 07:46
Forum: DOS Batch Forum
Topic: Game Of Life
Replies: 21
Views: 3244

Re: Game Of Life

Thanks. I'm willing to bet you have a scale setting (in your Windows Display settings) set to something larger than 100%. Apparently Cmwiz doesn't take this into account. I will add it to the list of Cmdwiz bugs to fix.

EDIT: now fixed in Cmdwiz 1.5
by misol101
08 Jun 2020 04:45
Forum: DOS Batch Forum
Topic: Game Of Life
Replies: 21
Views: 3244

Re: Game Of Life

Fullscreen at 1360 * 768 pixels (Native resolution is 3840 * 2160, at which only approx 1/6th of the cmd window is occupied by cmdgfx_gdi's output) hmm, that’s a bit puzzling. 3840*2160 (8 million pixels) is admittedly a much larger screen than I ever tried cmdgfx with (max I tried is probably 1920...
by misol101
07 Jun 2020 13:31
Forum: DOS Batch Forum
Topic: Game Of Life
Replies: 21
Views: 3244

Re: Game Of Life

Liking the color by state expession. I'm getting approximately 18 frames per second for the latest version compared to the ~110 from your original version. I actually prefer that pace as it's easier to see the evolution between generations. Did have to lower my screen res to scale it to full screen...
by misol101
06 Jun 2020 07:38
Forum: DOS Batch Forum
Topic: Game Of Life
Replies: 21
Views: 3244

Re: Game Of Life

Optimization attempt: The general rule for expressions is simple: the longer they are, the slower they run. At a granularity of ~2 million pixels, it might be worth trying to cut it a bit. By only allowing using color 1, we can get rid of 9 calls to gtr, plus the final multiplication. But isn't that...
by misol101
06 Jun 2020 05:10
Forum: DOS Batch Forum
Topic: Game Of Life
Replies: 21
Views: 3244

Re: Game Of Life

try doing the same in pixel mode and it wouldn't be so pretty... Actually let's try it: @echo off setlocal EnableDelayedExpansion cmdwiz fullscreen 1 & cmdwiz showcursor 0 cmdwiz getdisplaydim w & set /a w=!errorlevel! cmdwiz getdisplaydim h & set /a h=!errorlevel! set /a density=10, col=10 if not ...
by misol101
06 Jun 2020 02:49
Forum: DOS Batch Forum
Topic: Game Of Life
Replies: 21
Views: 3244

Re: Game Of Life

Mmmm... I am confused... If I correctly understood, your long expression count the neighbours of one pixel , store it in s0 storage variable (there are just 5 storage variables) and this variable is used to know the final value of the pixel. However, your description did not explain what to do with...
by misol101
05 Jun 2020 08:32
Forum: DOS Batch Forum
Topic: Batch wont display anything on my new PC???
Replies: 5
Views: 1254

Re: Batch wont display anything on my new PC???

Does the cmd window just seem to hang, no input or output?

It did for me, try enabling legacy console mode in cmd preferences.
by misol101
03 Jun 2020 12:58
Forum: DOS Batch Forum
Topic: Game Of Life
Replies: 21
Views: 3244

Re: Game Of Life

Can't yet claim to understand how the rules of Game of life are being implemented in the script Things do tend to get cryptic when having to compose everything in a single line :mrgreen: (not true, it could be broken into several lines, but i digress) Actually, it's worth a break-down. Entire expre...
by misol101
03 Jun 2020 11:50
Forum: DOS Batch Forum
Topic: Game Of Life
Replies: 21
Views: 3244

Re: Game Of Life

I may just have to start learning how to utilise cmdgfx Please do if you feel like it, would be fun to see what you could do with it. It is fairly well documented, both from command line and at https://github.com/misol1/cmdgfx/blob/master/README.md Then again, it is quite a feature-rich program (so...
by misol101
02 Jun 2020 15:47
Forum: DOS Batch Forum
Topic: Game Of Life
Replies: 21
Views: 3244

Re: Game Of Life

Nice :) Here is a rather minimal version using cmdgfx.exe: @echo off set /a w=160, h=80, density=10, col=1 mode %w%,%h% if not defined _ set _=. & call %0 | cmdgfx.exe "fbox 0 0 db & block 0 0,0,%w%,%h% 0,0 -1 0 0 - random()*100/(101-%density%)" S :rep echo "cmdgfx: block 0 0,0,%w%,%h% 0,0 -1 0 0 - ...
by misol101
02 Jun 2020 08:34
Forum: DOS Batch Forum
Topic: Performance & Optimization of Batch Files
Replies: 3
Views: 1193

Re: Performance & Optimization of Batch Files

Ok, here is my no 1 trick: use another language :P (best bet: jscript+minimal batch startup) It would actually be interesting to know if there is any other common scripting language as slow as batch? But ok, trying to be more helpful regarding the topic, from what I can remember off the top of my he...