Search found 1973 matches
- 28 Apr 2023 15:46
- Forum: DOS Batch Forum
- Topic: Batch file deletion
- Replies: 2
- Views: 3709
Re: Batch file deletion
Ad hoc i can't see a statement or command that XP would not support, or use differently than the newer versions. The only potential risks of incompatability i see are: - The usage of the localization dependend variables "date" and "time" (so it could happen on all windows versions). - External execu...
- 28 Apr 2023 15:19
- Forum: DOS Batch Forum
- Topic: 256 colors in virtual terminal escape sequence
- Replies: 41
- Views: 54150
Re: 256 colors in virtual terminal escape sequence
But wouldn't it have been better to average the three colors i.e. (R + G + B) /3 ? The idea behind RGB is, that components agree on the color produced. It doesn't match how humans experience color, though the result is somewhat acceptable. Would "L" be the brightness/lightness? English is not my mo...
- 27 Apr 2023 17:20
- Forum: DOS Batch Forum
- Topic: 256 colors in virtual terminal escape sequence
- Replies: 41
- Views: 54150
Re: 256 colors in virtual terminal escape sequence
Can you explain what you did here? :: set /a "%4.MIN3=-((%22-%11)>>32)*(-((%33-%22)>>32)*%3 - ((%22-%33)>>32)*%2) - ((%11-%22)>>32)*(-((%33-%11)>>32)*%3 - ((%11-%33)>>32)*%1)" :: set /a "%4.MAX3=-((%22-%11)>>32)*(-((%33-%11)>>32)*%1 - ((%11-%33)>>32)*%3) - ((%11-%22)>>32)*(-((%33-%22)>>32)*%2 - ((%...
- 26 Apr 2023 07:51
- Forum: DOS Batch Forum
- Topic: 256 colors in virtual terminal escape sequence
- Replies: 41
- Views: 54150
Re: 256 colors in virtual terminal escape sequence
As said above, i assumed linear distances of the colors in RGB-space: The main advantage is, it is easy to compute, because color distances are just euclidean distances over the coordinates of the RGB colors. The main issue is, that human perception of color is everything but linear. Typically that ...
- 25 Apr 2023 18:19
- Forum: DOS Batch Forum
- Topic: 256 colors in virtual terminal escape sequence
- Replies: 41
- Views: 54150
Re: 256 colors in virtual terminal escape sequence
I've replaced the grayscale algorithm, the (unoptimized - but hopefully bug-free) result is the following mapping function: :toColorTable R G B return var :: part 1 (sloppy is sufficient) set /a "%4.r1= -(-(%1>>6)>>2), %4.g1= -(-(%2>>6)>>2), %4.b1= -(-(%3>>6)>>2), %4.isDarkGray=%4.r1*%4.g1*%4.b1" se...
- 24 Apr 2023 18:03
- Forum: DOS Batch Forum
- Topic: 256 colors in virtual terminal escape sequence
- Replies: 41
- Views: 54150
Re: 256 colors in virtual terminal escape sequence
Ok, i somehow missed the fact, that the difference between 0 and 95 isn't 40... :oops: . Your solution already finds the best color match; however this is my try: :: color function style set /A "%4=(((%1)-35)/40+((%1-48)>>8)-((%1-74)>>8))*36 + (((%2)-35)/40+((%2-48)>>8)-((%2-74)>>8))*6 + (((%3)-35)/...
- 23 Apr 2023 12:45
- Forum: DOS Batch Forum
- Topic: 256 colors in virtual terminal escape sequence
- Replies: 41
- Views: 54150
Re: 256 colors in virtual terminal escape sequence
I'm not sure what you mean, the above computations should return an index (i) for the indexed color (r_i, g_i, b_i) with the minimal error to the given color value (r, g, b) - at least for any system, that uses the above colour table predefined by Microsoft: - The formular for (2) should return the ...
- 23 Apr 2023 05:54
- Forum: DOS Batch Forum
- Topic: 256 colors in virtual terminal escape sequence
- Replies: 41
- Views: 54150
Re: 256 colors in virtual terminal escape sequence
The color map (at least on my pc) is piecewise linear. 1) Indices 0x00 - 0x0F contain the most non-linear part: ( 0, 0, 0), (128, 0, 0), ( 0, 128, 0), (128, 128, 0), ( 0, 0, 128), (128, 0, 128), ( 0, 128, 128), (192, 192, 192), (128, 128, 128), (255, 0, 0), ( 0, 255, 0), (255, 255, 0), ( 0, 0, 255),...
- 03 Apr 2023 16:39
- Forum: DOS Batch Forum
- Topic: Batch multiple UP calls from Main Batch not works!?
- Replies: 4
- Views: 3698
Re: Batch multiple UP calls from Main Batch not works!?
I assume the error is caused by using the wrong environment variable named "Aufruf:" instead of "Aufruf", like you did in "Linie2.bat":
penpen
Code: Select all
:: Linie2.bat
set /p Aufruf="Aufruf:"
:: versus
set /p Aufruf:="Aufruf:"
penpen
- 03 Apr 2023 16:13
- Forum: DOS Batch Forum
- Topic: Parallax background, and overlapping images properly
- Replies: 14
- Views: 18079
Re: Parallax background, and overlapping images properly
If i remember correct, then you can find those in the Templates for Parallax zip-file IcarusLives linked somewhere above, but under a diffferent name:
- "template1.ppm" is "cloud1.ppm"
- "template2.ppm" is "mountain1.ppm"
- "template3.ppm"should contain another mountain version.
penpen
- "template1.ppm" is "cloud1.ppm"
- "template2.ppm" is "mountain1.ppm"
- "template3.ppm"should contain another mountain version.
penpen
- 03 Apr 2023 15:35
- Forum: DOS Batch Forum
- Topic: How to check if a wired connection is present in a batch file?
- Replies: 2
- Views: 1652
Re: How to check if a wired connection is present in a batch file?
The following might help you:
Though i would add debug messages (using echo) and pauses, to see the program flow.
In case you don't have a visible console on login, you might redirect the echoes and avoid the pause commands instead.
penpen
Code: Select all
powershell -NoProfile -Command get-NetIPConfiguration
In case you don't have a visible console on login, you might redirect the echoes and avoid the pause commands instead.
penpen
- 21 Feb 2023 17:12
- Forum: DOS Batch Forum
- Topic: Delect Registry Key
- Replies: 5
- Views: 3357
Re: Delect Registry Key
I actually can't test it, but it might be the space characters, that break the value early, so you might encapsulate the value "c:\Program Files\Common Files\Corel\" in doublequotes.
penpen
penpen
- 18 Jan 2023 08:15
- Forum: DOS Batch Forum
- Topic: Exporting two keys from Registry residing in two different places on Windows 10
- Replies: 9
- Views: 17111
Re: Exporting two keys from Registry residing in two different places on Windows 10
What you see there is a character encoding issue. Somehow the resulting file was created with the byte order mark (bom) of 'UTF-16 LE' (which could happen for various reasons). Then the reg file was appended. Save the text into a file using encoding 'UTF-16 LE'. Then open it within a hex-editor. Del...
- 11 Dec 2022 06:22
- Forum: DOS Batch Forum
- Topic: This is really stupid but
- Replies: 1
- Views: 6495
Re: This is really stupid but
In case your computer runs on the "pro", "enterprise" or "educational" version of windows 10 (probably the same under Windows 11), then you may use "msg" or "net send ..." commands to send messages to computers in your local network: msg /SERVER:DestinationPC * /TIME:60 "Sample message to pc 'Destin...
- 04 Nov 2022 02:59
- Forum: DOS Batch Forum
- Topic: [Destructive, Use Caution] Copy tags and its child elements from specific XML schema
- Replies: 23
- Views: 11825
Re: Copy tags and its child elemnts from specific XML schema
Though i like Aacini's version, it is not completely safe (for example if you change the codepage of the source-xml).
Here is an example for how to read and process xml using jscript (in the hybrid "xslt.bat") in a safe way:
viewtopic.php?p=32941#p32941.
Here is an example for how to read and process xml using jscript (in the hybrid "xslt.bat") in a safe way:
viewtopic.php?p=32941#p32941.