Search found 208 matches
- 12 Sep 2021 00:40
- Forum: DOS Batch Forum
- Topic: Markdown to HTML converter
- Replies: 4
- Views: 7806
Re: Markdown to HTML converter
More words about some circumstances having to do with particular implementations. Because of its limitation, the batch script accepts the -u/-U and -t/-T options in this order exactly. It can be changed to enable an arbitrary order but makes the script more complicated. Right now I don't want to do ...
- 11 Sep 2021 15:37
- Forum: DOS Batch Forum
- Topic: Markdown to HTML converter
- Replies: 4
- Views: 7806
Markdown to HTML converter
Earlier jfl implemented his own batch script which converts markdown to HTML sending requests towards GitHub or another API with curl. His script is published in thread A dual Batch+CSS script to convert Markdown to HTML . Since that time I kept hope to combine both ways -- using local pandoc and re...
- 03 Sep 2021 10:10
- Forum: DOS Batch Forum
- Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
- Replies: 64
- Views: 242787
Re: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
What has been done -- fix handling with command line options for PowerShell chimera (when there is the only parameter, it has been stored as a string, not as an array) -- remove auxiliary variables :: USAGE :: cmdize name [...] :: :: This tool converts a supported code into a batch file that can be...
- 03 Sep 2021 10:04
- Forum: DOS Batch Forum
- Topic: How to reset a batch variable in Powershell?
- Replies: 3
- Views: 3348
Re: How to reset a batch variable in Powershell?
I guess the following experiment covers your requirements. But pay your attention that deleting environment variable works only within PS. Deletion doesn't propagate to upper process (CMD in your case). So when you return to CMD, you'll see the original value: Set the variable in CMD and call PS C:\...
- 14 Feb 2021 04:39
- Forum: DOS Batch Forum
- Topic: How to use the output of my first command in my second command in one step?
- Replies: 5
- Views: 5024
Re: How to use the output of my first command in my second command in one step?
Create a batch script with this content: @echo off setlocal set "reg_key=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.docx\UserChoice" for /f "tokens=1,2,3" %%a in ( ' reg query "%reg_key%" ' ) do if /i "%%~a" == "Progid" ( vboxcontrol guestproperty set /mypropertie...
- 13 Feb 2021 07:49
- Forum: DOS Batch Forum
- Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
- Replies: 64
- Views: 242787
Re: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
What has been done -- some improvements to the PowerShell chimera creation -- support Ruby The full list of supported languages and technologies -- JavaScript -- VBScript -- Perl -- Shell/Bash -- PowerShell -- Python -- Ruby -- HTA -- HTML -- WSF -- KixStart -- AutoIt, AutoHotKey -- PHP -- Julia So...
- 25 Nov 2020 04:26
- Forum: DOS Batch Forum
- Topic: ansi.bat: handling ANSI sequences in nowadays WIN terminals
- Replies: 8
- Views: 7755
Re: ansi.bat: handling ANSI sequences in nowadays WIN terminals
@aGerman
Dave said:
Dave said:
Steffen, is it your personal finding? Or it was found somewhere in the Internet?aGerman discovered that CSCRIPT can enable the escape sequences simply by running an innocuous PowerShell command
- 24 Nov 2020 10:19
- Forum: DOS Batch Forum
- Topic: ansi.bat: handling ANSI sequences in nowadays WIN terminals
- Replies: 8
- Views: 7755
Re: ansi.bat: handling ANSI sequences in nowadays WIN terminals
enable the escape sequences simply by running an innocuous PowerShell command Cool trick! I've just tested it with wsx.bat , my own REPL tool announced here https://www.dostips.com/forum/viewtopic.php?f=3&t=9476&hilit=wsx. And it works. Here is the example. It's long one-liner separated into few su...
- 24 Nov 2020 07:00
- Forum: DOS Batch Forum
- Topic: ansi.bat: handling ANSI sequences in nowadays WIN terminals
- Replies: 8
- Views: 7755
ansi.bat: handling ANSI sequences in nowadays WIN terminals
A few days ago i found out that windows terminal supports ANSI sequences. It's cool, of course. However, as it's usual in Windows world, every cool feature has worse things. VT is off, by default. Luckily, it can be turned on easily. ENABLE/DISABLE Turn on: reg add HKCU\Console /v VirtualTerminalLev...
- 30 Oct 2020 08:49
- Forum: DOS Batch Forum
- Topic: Determine Yes/No/All string for current locale
- Replies: 17
- Views: 16770
Re: Determine Yes/No/All string for current locale
You might want to include space in the delimiter list if you want the entire word without trailing space. Trailing spaces are already trimmed in the separate section of the script. I didn't include the space in the delimiter list because it would be too hard to parse the string. Even more, I am not...
- 29 Oct 2020 17:00
- Forum: DOS Batch Forum
- Topic: Determine Yes/No/All string for current locale
- Replies: 17
- Views: 16770
Re: Determine Yes/No/All string for current locale
At least this one covers both English (WIN10) and Russian (XP and WIN10) versions. Based on my results I can suppose that it could cover others as well. At least in the frame of the supported formats: @echo off setlocal set "ans_yes=" set "ans_no=" set "ans_all=" copy /y nul zzz >nul for /f "tokens=...
- 29 Oct 2020 10:24
- Forum: DOS Batch Forum
- Topic: A killer : in a comment
- Replies: 15
- Views: 11012
Re: A killer : in a comment
Does that post in Russian have to do with the current discussion? http://forum.script-coding.com/viewtopic.php?pid=80608#p80608 Briefly... Content in comments is able to cause a syntactic (captured) error. set a=1 rem comment %a:=% set a=1 :: comment %a:=% The "::" comments are parsed as well as the...
- 29 Oct 2020 00:33
- Forum: DOS Batch Forum
- Topic: Determine Yes/No/All string for current locale
- Replies: 17
- Views: 16770
Re: Determine Yes/No/All string for current locale
It doesn't work in Russian (XP and WIN10) yes = да no = No all = нет yes character = д no character = N all character = н because >copy /-y nul zzz <nul Скопировано файлов: 1. >copy /-y nul zzz <nul Заменить zzz [Yes (да)/No (нет)/All (все)]: Скопировано файлов: 0. UPDATED: Russian words for Yes/No/...
- 23 Sep 2020 10:32
- Forum: DOS Batch Forum
- Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
- Replies: 64
- Views: 242787
Re: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
The latest to this moment version of the script. What has been done -- some cosmetic changes -- improve slightly the argument processing -- add hybridization for AutoIt, AutoHotKey and PHP -- improve creation of the PowerShell chimera The full list of supported languages and technologies -- JavaScri...
- 14 Sep 2020 08:46
- Forum: DOS Batch Forum
- Topic: SUDO for CMD
- Replies: 9
- Views: 17403
Re: SUDO for CMD
It looks like it is solved in gsudo. Sorry, it's C#, not a pure batch.a way to redirect stdin/stdout/stderr from the elevated shell, back into the original shell