[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: batch files/dos commands from Xy4



Reply to note from Bill Troop  Wed, 05 Dec 2001
11:09:34 -0500

> As I wrote before, after I suspend or hibernate on my Dell
> 8100/XP laptop, time gets "lost" for the entire time the
> computer spends in suspend/hibernation. The cure is to execute
> the DOS time command, pressing return. Executing the command
> "time /t" dos the same thing without your having to press
> return.

I hadn't heard of TIME /T. In NT it reports the time without
prompting for a new time. I don't see it documented anywhere. In
OS/2 the switch is /N. (You don't say what OS you're running.)

> . . . If I use dos /c in the command line, that
> doesn't work, because "/t" doesn't get passed to the command
> interpreter, or gets passed incorrectly, and the result is a
> prompt saying "invalid time".

Yes, I get this in NT. Strange. Pushing the command into a BATch
file doesn't help. Yet DOS/NV/X /C TIME/? works (types the Help
screen before returning to Xy). (In OS/2, DOS/NV/X /C TIME/N works
as expected.)

> What I want to do is to create a simple new command in
> Xy4, let's call it now2 or nw. It will simply behave as "now"
> always did except that before it executes, it will execute a
> DOS batch file that runs "time /t" or will simply execute "time
> /t", then return to Xy4 to execute the "now" without any
> further intervention.

Well, since TIME /T won't work with the DOS command, we'll need to
try something else. Recall that TIME with no argument reports the
current system time and then prompts for a new time; if you press
Enter, the prompt goes away. So let's try piping a carriage return
to a bare TIME command. Just might work.

Issue DECODE to decode the frame below. Copy it into U2.
Do NOT attempt to SAve or STore U2. Rather, issue LH, then
ABort the file. The command is NOW2.

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5now2}} Execute NOW after refreshing system time [CLD][cr|
lf]{2}{<}PRRefreshing system time{>}{<}SX01,{<}VADR{>}+"\_CRL
F_.TXT"{>}{<}SV02,[cr|lf]{>}[BX_]sa %02,{<}PV01{>}[Q2_];*;[cr
|lf]{<}SU02,{>}{<}IF{<}VA$MT{>}<1{>}[BX_]d mt=1[Q2_]{<}SU02,[
BX_]d mt=0[Q2_]{>}{<}EI{>};*;[cr|lf][BX_]dos/nv/x/z /c type {
<}PV01{>}|time>nul[Q2_][BX_]wait[Q2_]{<}GT02{>};*;[cr|lf][BX_
]ernv {<}PV01{>}[Q2_][BX_]now[Q2_]{2}[cr|lf][cr|lf]
-nd
XPLeNCODE

I wonder if there's another, less complicated way to refresh the
system time. Is it possible that executing *any* command will wake
the system up? Let's try VER. The command is NOW3. Does
it work?

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5now3}} Execute NOW after refreshing system time [CLD][cr|
lf]{2}{<}SU01,{>}{<}IF{<}VA$MT{>}<1{>}[BX_]d mt=1[Q2_]{<}SU01
,[BX_]d mt=0[Q2_]{>}{<}EI{>};*;[cr|lf][BX_]dos/nv/x/z /c ver>
nul[Q2_][BX_]wait[Q2_]{<}GT01{>}[BX_]now[Q2_]{2}[cr|lf][cr|lf
]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/