Search found 91 matches

by carlsomo
20 Jan 2014 23:23
Forum: DOS Batch Forum
Topic: sending things over serial
Replies: 5
Views: 4814

Re: sending things over serial

Real Terminal emulation software: m Command line and script options are available. The version I use only runs on Win 32 bit but they may have updated the program since I downloaded it. I have serial devices attached to PC via serial to USB cables and this software works great capturing serial outpu...
by carlsomo
30 Dec 2013 02:39
Forum: DOS Batch Forum
Topic: Pure DOS valid Date checker
Replies: 5
Views: 6299

Re: Pure DOS valid Date checker

OK, here is the solution to all the ills of South African date checkers and thanks for the input BTW I just hope this solution doesn't screw up the Somalians: @echo off&goto :start :Valid_Date Date echo.:::----------------------------------------------------------::: echo.::: Syntax: Valid_Date ...
by carlsomo
30 Dec 2013 02:30
Forum: DOS Batch Forum
Topic: SNAKE.BAT 4.1 - An arcade style game using pure batch
Replies: 108
Views: 453129

Re: SNAKE.BAT 3.4 - An arcade style game using pure batch

It's amazing to me the optimization you have performed and how fast this thing can run in pure batch mode. All I can say is, "WOW". There is a lot of useful code that can apply to non-gaming situations as I see it. It is not that simple to program a little devil that can sit and wait for a...
by carlsomo
30 Dec 2013 02:20
Forum: DOS Batch Forum
Topic: Conversation
Replies: 39
Views: 27200

Re: Conversation

Sorry to hear your useful code has been deleted. Wow that sucks. Sorry to have judged you wrongly.
I am getting in to JAVA now.
Peace, dude
Carl
by carlsomo
30 Dec 2013 02:15
Forum: DOS Batch Forum
Topic: Pure DOS valid Date checker
Replies: 5
Views: 6299

Re: Pure DOS valid Date checker

OK, good point. I suggest you may modify the routine to accept South African convention and then post it for the South Africans who may be disprivileged. As I see it, one must make compromises for the more numerous Germans who use the '.' separator with the Year first as well as Americans who always...
by carlsomo
30 Dec 2013 01:55
Forum: DOS Batch Forum
Topic: Conversation
Replies: 39
Views: 27200

Re: Conversation

to: berserker AKA PHONY I have been sitting on the sidelines but now I have a suggestion for you. Post some useful DOS batch code or go away and post elsewhere? Or how about posting any code in any language you have written that might be useful? I have not seen one contribution by you here so that m...
by carlsomo
30 Dec 2013 00:49
Forum: DOS Batch Forum
Topic: Pure DOS valid Date checker
Replies: 5
Views: 6299

Pure DOS valid Date checker

**EDIT: See my post on Sun, Jan 26, 2014 for latest update / correction for older dates ** I often write routines that allow a user to input a date. This is very often very problematic to say the least. Users often do not care about which format is expected and routines that may call this routine m...
by carlsomo
08 Nov 2013 23:38
Forum: DOS Batch Forum
Topic: ReturnVar macro revisited
Replies: 30
Views: 27512

Re: ReturnVar macro revisited

Ah, very interesting... My macro fails if there is not a character after a CR or LF other than CR or LF else it works so take your latest test 6 (works) and 7 and 8, does not work and try this: change 7 and 8 to this: set "test7=Line1!LF!Line2!LF!." set "test8=Line1!CR!.!LF!Line2"...
by carlsomo
08 Nov 2013 02:11
Forum: DOS Batch Forum
Topic: ReturnVar macro revisited
Replies: 30
Views: 27512

Re: ReturnVar macro revisited

Dear jeb, I tried very hard not to use a temp file but this version had to resort to that only when called from a disabled environment with linefeeds in the transfer variable. I am not happy with it but it passes the jeb test. It would be much more satisfying to avoid writing to file under any circu...
by carlsomo
05 Nov 2013 02:14
Forum: DOS Batch Forum
Topic: ReturnVar macro revisited
Replies: 30
Views: 27512

Re: ReturnVar macro revisited

This version handles everything correctly with the exception of the linefeed in the disabled context - Only 2 FAILS This segment: if defined _#_$_dis (%\n% for /f delims^^=^^ eol^^= %%A in (""!%%~N!"") do @(%\n% if defined _#_$_dis (endlocal ^& set "%%~N=%%~A" ^&...
by carlsomo
04 Nov 2013 01:37
Forum: DOS Batch Forum
Topic: ReturnVar macro revisited
Replies: 30
Views: 27512

Re: ReturnVar macro revisited

This routine passes the latest jeb test but it does not work with some other tests with bat to bat calls with expansion disabled nor to the typically disabled command line: :TestReturnVar.bat @echo off setlocal DisableDelayedExpansion if not defined ReturnVar call :ReturnVar set ret set /a test_cnt=...
by carlsomo
01 Nov 2013 17:50
Forum: DOS Batch Forum
Topic: Delay-Wait-Sleep tricks.
Replies: 64
Views: 61900

Re: Delay-Wait-Sleep tricks.

Here is an accurate delay routine, but it uses CPU @echo off&goto :start :Delay milliseconds echo.Delay milliseconds echo.Delays for the specified # of milliseconds echo.Always accurate to within 10 milliseconds echo.Returns error of precision in milliseconds echo.Requires %%time%% variable in m...
by carlsomo
01 Nov 2013 17:19
Forum: DOS Batch Forum
Topic: ReturnVar macro revisited
Replies: 30
Views: 27512

Re: ReturnVar macro revisited

This is the result with the latest iteration of ReturnVar with jeb's latest test: Test now test1='^a!"^b' Test #1 Disable/Disable result='^a!"^b' - OK Test #2 Disable/Enable result='^a!"^b' - OK Test #3 Enable/Disable result='^a!"^b' - OK Test #4 Enable/Enable result='^a!"^b...
by carlsomo
01 Nov 2013 01:41
Forum: DOS Batch Forum
Topic: ReturnVar macro revisited
Replies: 30
Views: 27512

Re: ReturnVar macro revisited

I figured out my problem and my final solution to the issue of avoiding a helper function is this: Use the following ReturnVar macro form any environment without CR and LF in the transfer variable. If one wishes to pass a transfer variable that contains CR or LF characters then set the environment t...
by carlsomo
31 Oct 2013 22:28
Forum: DOS Batch Forum
Topic: ReturnVar macro revisited
Replies: 30
Views: 27512

Re: ReturnVar macro revisited

jeb I cannot explain why this works on my computer (win7) or on my work computer with XP but it seems to work for this series of tests. It should not work and I did not expect it to work but here it is: :TestReturnVar.bat @echo off setlocal DisableDelayedExpansion if not defined ReturnVar call :Retu...