Search found 470 matches

by Liviu
29 Apr 2014 21:25
Forum: DOS Batch Forum
Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
Replies: 64
Views: 242159

Re: js/vbs/html/hta hybrids and chimeras in cmd/bat

@penpen, sorry if something came off the wrong way about my "funny story", surely dind't mean it. What I wanted to actually say is that proper attribution is often difficult in batch world and, while I always try to give credit where credit is due, misses or mistakes happen. After all, thi...
by Liviu
28 Apr 2014 20:37
Forum: DOS Batch Forum
Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
Replies: 64
Views: 242159

Re: js/vbs/html/hta hybrids and chimeras in cmd/bat

@Dave, that's a nice well rounded writeup. And thanks for the credit, though accurate attributions are often times hard to come by in batch world. The arcane batch syntax - and the lengths we go to and pervert it further - makes searches difficult to try and locate the original sources. One can't go...
by Liviu
26 Apr 2014 16:47
Forum: DOS Batch Forum
Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
Replies: 64
Views: 242159

Re: js/vbs/html/hta hybrids and chimeras in cmd/bat

Maybe the xml authors add a "default/global namespace access" (to attributes, somewhere) in the future It crossed my mind that ":" could be mis-parsed as a namespace:variable with both strings empty, then expanded to a null token and ignored. Or maybe the parser is so fixated on...
by Liviu
26 Apr 2014 16:24
Forum: DOS Batch Forum
Topic: An alternative command prompt (Dos9)
Replies: 34
Views: 26477

Re: An alternative command prompt (Dos9)

@penpen, nice rundown. Just a couple of notes below. That's not completely true, you may use the csc flag, see: <link to German MSDN help for fopen> VC 6 is a bit dated, in particular about Unicode support in the CRT. For example, the ccs flag was only introduced in VS 2005 a.k.a. VC 8. You can chec...
by Liviu
25 Apr 2014 22:10
Forum: DOS Batch Forum
Topic: An alternative command prompt (Dos9)
Replies: 34
Views: 26477

Re: An alternative command prompt (Dos9)

ansi input can still be used as long a you continue to type japanese on a japanese codepage Not sure what you mean here, but anyway Japanese codepages are not the best starting point to practice codepage-based i/o in Windows. For one thing, they are double-byte codepages, which introduces another w...
by Liviu
24 Apr 2014 23:54
Forum: DOS Batch Forum
Topic: An alternative command prompt (Dos9)
Replies: 34
Views: 26477

Re: An alternative command prompt (Dos9)

Still think you are misunderstanding, or maybe just misusing, the notion of "codepage". I understand what you say [...] I'm however right, if Dos9 get UTF-16 input, it actually reads garbage because there are NUL inserted between the ascii character. That's not how it works in Windows. Do...
by Liviu
24 Apr 2014 21:31
Forum: DOS Batch Forum
Topic: Microsoft makes source code for MS-DOS and Word for Windows
Replies: 6
Views: 16660

Re: Microsoft makes source code for MS-DOS and Word for Wind

These sources answered the question: "Why [] are considered as special characters ?" ( http://www.dostips.com/forum/viewtopic.php?p=33992#p33992 ) In short - since MS-DOS 2.0 internaly some ANSI escape sequences are used for some kind of signaling: For example ESC"[K" for erase ...
by Liviu
24 Apr 2014 00:56
Forum: DOS Batch Forum
Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
Replies: 64
Views: 242159

Re: js/vbs/html/hta hybrids and chimeras in cmd/bat

"%~f0?.wsf" Very interesting trick allowing to run a batch file as wsf scenario. I tried to embed wsf into bat/cmd but all my attempts bumped to impossibility to run bat file as wsf (as it is possible for vbs or js scenarios). Is there source where I could learn more about it? Seems it us...
by Liviu
24 Apr 2014 00:05
Forum: DOS Batch Forum
Topic: An alternative command prompt (Dos9)
Replies: 34
Views: 26477

Re: An alternative command prompt (Dos9)

Sorry, don't know what you mean by "Unicode page". Windows itself uses UTF16 internally. What I showed was copy/pasted from a cmd prompt set to use Lucida Console (or another Unicode/TT - not raster) font. Ok, windows console support at least two unicode code page. The first is UTF-16 (12...
by Liviu
23 Apr 2014 23:30
Forum: DOS Batch Forum
Topic: CALL it only IF it is FOR no reason
Replies: 7
Views: 7117

Re: CALL it only IF it is FOR no reason

My picture of the cmd source code is more like a bowl of spaghetti Do you have decompiled cmd? My attempts with opensource decompilers failed... No, that would kill all fun of trying to second guess it Besides, my take on decompilers is along the line of (paraphrased) "can't bring a cow back f...
by Liviu
22 Apr 2014 23:04
Forum: DOS Batch Forum
Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
Replies: 64
Views: 242159

Re: js/vbs/html/hta hybrids and chimeras in cmd/bat

html in cmd/bat the second version found by the programmer from Russia is the best. http://forum.script-coding.com/viewtopic.php?pid=79317#p79317 <!-- : @echo off start "" mshta.exe "%~f0" exit /b --> [... html code here ...] Cool trick, that XML '<!-- -->' comment crossed with ...
by Liviu
22 Apr 2014 21:26
Forum: DOS Batch Forum
Topic: An alternative command prompt (Dos9)
Replies: 34
Views: 26477

Re: An alternative command prompt (Dos9)

Type CD drive: to display the current directory in the specified drive. Type CD without parameters to display the current drive and directory. Use the /D switch to change current drive in addition to changing current directory for a drive. With all due respect, but if you are to lay any claim to &q...
by Liviu
22 Apr 2014 20:27
Forum: DOS Batch Forum
Topic: CALL it only IF it is FOR no reason
Replies: 7
Views: 7117

Re: CALL it only IF it is FOR no reason

Nice topic title It is possible to call IF and FOR: call if a equ a Don't think that "a equ a" is actually relevant, "call if ???" also "works" i.e. does nothing. More examples in the thread at http://www.dostips.com/forum/viewtopic.php?p=32829#p32829 with some curious ...
by Liviu
21 Apr 2014 20:14
Forum: DOS Batch Forum
Topic: An alternative command prompt (Dos9)
Replies: 34
Views: 26477

Re: An alternative command prompt (Dos9)

It also appeared it was bound to dissapear because of the lack of newer features that it need (like command substitution, for example "$(command)"), and it would be sad if it does. Doesn't appear to me that cmd is bound to disappear. If anything, it's still being worked on, bugfixed and e...
by Liviu
21 Apr 2014 19:34
Forum: DOS Batch Forum
Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
Replies: 64
Views: 242159

Re: js/vbs/html/hta hybrids and chimeras in cmd/bat

js in cmd/bat these solutions are world-wide and well-known. @if (true == false) @end /* @echo off cscript //nologo //e:javascript "%~dpnx0" %* goto :EOF */ WScript.Echo('Hello from JScript'); Just as a side note, but since this example in particular attempts to pass the '%*' command line...