Which are the "Invalid macro definition"s?

J

Jack Crane

I have a file, C:\doskeymacros.txt containing a bunch of macros. Every
time I open the Windows XP command line window (console? What's the
correct term?) I see:

===================================
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
Invalid macro definition.
Invalid macro definition.

C:\Documents and Settings\Riley>
=====================================

I'd like to get rid of the 2 bad macros, but I can't figure out which
they are. Here's the text of the file:

========doskeymacros.txt===============
temp=\python24\MyScripts\TempConverter.py
timer=cd \python24\MyScripts\ $T timer.py
spin=\python24\MyScripts\spin.py
frac=\python24\MyScripts\frac.py
cal=\python24\MyScripts\calendar_for_specified_year.py
ttt=\Python24\BeginnerGameBook\chapter06\tic-tac-toe.py
cp=cd C:\Python24\
cptk=cd C:\Python24\Tkinter\
cps=cd C:\Python24\Scripts\
cbgb=cd C:\Python24\BeginnerGameBook\
c=cd c:\
up=cd ..
up2=cd .. $T cd ..
::dt=deltree c:\windows\temp\ maybe shouldn't use with XP?
e=exit
p=ping $1
t=tracert $1
py=ping yahoo.com
ty=tracert yahoo.com
put=ping www.u-tokyo.ac.jp
tut=tracert www.u-tokyo.ac.jp
pjls=ping www.johnlscott.com
tjls=tracert www.johnlscott.com
ta=tracert www.aplushosting.com
pa=ping www.unisa.edu.au
pb=ping news.fu-berlin.de
tb=tracert news.fu-berlin.de
pl=ping www.lon.ac.uk
tl=tracert www.lon.ac.uk
pg=ping google.com
tg=tracert google.com
pp=ping aplushosting.com
tp=tracert aplushosting.com
pr=ping www.rcblue.com
tr=tracert www.rcblue.com
ps=ping spro.net
ts=tracert spro.net
:: $b used like the pipe symbol ("|") in UNIX
:: see http://www.vfrazee.com/ms-dos/6.22/help/doskey.htm
ip=ipconfig/all $b more
mac=doskey /macros $b more
===================================

Which 2 are ill-formed?

Thanks,

Jack Crane
 
J

Jim Byrd

At a quick guess, up2 and ip

--
Regards, Jim Byrd, MVP, DTS, ASVOP
My Blog, Defending Your Machine,
http://defendingyourmachine.blogspot.com/



In Jack Crane <[email protected]> typed:
|| I have a file, C:\doskeymacros.txt containing a bunch of macros.
|| Every time I open the Windows XP command line window (console?
|| What's the correct term?) I see:
||
|| ===================================
|| Microsoft Windows XP [Version 5.1.2600]
|| (C) Copyright 1985-2001 Microsoft Corp.
|| Invalid macro definition.
|| Invalid macro definition.
||
|| C:\Documents and Settings\Riley>
|| =====================================
||
|| I'd like to get rid of the 2 bad macros, but I can't figure out which
|| they are. Here's the text of the file:
||
|| ========doskeymacros.txt===============
|| temp=\python24\MyScripts\TempConverter.py
|| timer=cd \python24\MyScripts\ $T timer.py
|| spin=\python24\MyScripts\spin.py
|| frac=\python24\MyScripts\frac.py
|| cal=\python24\MyScripts\calendar_for_specified_year.py
|| ttt=\Python24\BeginnerGameBook\chapter06\tic-tac-toe.py
|| cp=cd C:\Python24\
|| cptk=cd C:\Python24\Tkinter\
|| cps=cd C:\Python24\Scripts\
|| cbgb=cd C:\Python24\BeginnerGameBook\
|| c=cd c:\
|| up=cd ..
|| up2=cd .. $T cd ..
|||| dt=deltree c:\windows\temp\ maybe shouldn't use with XP?
|| e=exit
|| p=ping $1
|| t=tracert $1
|| py=ping yahoo.com
|| ty=tracert yahoo.com
|| put=ping www.u-tokyo.ac.jp
|| tut=tracert www.u-tokyo.ac.jp
|| pjls=ping www.johnlscott.com
|| tjls=tracert www.johnlscott.com
|| ta=tracert www.aplushosting.com
|| pa=ping www.unisa.edu.au
|| pb=ping news.fu-berlin.de
|| tb=tracert news.fu-berlin.de
|| pl=ping www.lon.ac.uk
|| tl=tracert www.lon.ac.uk
|| pg=ping google.com
|| tg=tracert google.com
|| pp=ping aplushosting.com
|| tp=tracert aplushosting.com
|| pr=ping www.rcblue.com
|| tr=tracert www.rcblue.com
|| ps=ping spro.net
|| ts=tracert spro.net
|||| $b used like the pipe symbol ("|") in UNIX
|||| see http://www.vfrazee.com/ms-dos/6.22/help/doskey.htm
|| ip=ipconfig/all $b more
|| mac=doskey /macros $b more
|| ===================================
||
|| Which 2 are ill-formed?
||
|| Thanks,
||
|| Jack Crane
 
J

Jack Crane

I have a file, C:\doskeymacros.txt containing a bunch of macros. Every
time I open the Windows XP command line window (console? What's the
correct term?) I see:

===================================
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
Invalid macro definition.
Invalid macro definition.

C:\Documents and Settings\Riley>
=====================================

I'd like to get rid of the 2 bad macros, but I can't figure out which
they are. Here's the text of the file:

========doskeymacros.txt===============
temp=\python24\MyScripts\TempConverter.py
timer=cd \python24\MyScripts\ $T timer.py
spin=\python24\MyScripts\spin.py
frac=\python24\MyScripts\frac.py
cal=\python24\MyScripts\calendar_for_specified_year.py
ttt=\Python24\BeginnerGameBook\chapter06\tic-tac-toe.py
cp=cd C:\Python24\
cptk=cd C:\Python24\Tkinter\
cps=cd C:\Python24\Scripts\
cbgb=cd C:\Python24\BeginnerGameBook\
c=cd c:\
up=cd ..
up2=cd .. $T cd ..
::dt=deltree c:\windows\temp\ maybe shouldn't use with XP?
e=exit
p=ping $1
t=tracert $1
py=ping yahoo.com
ty=tracert yahoo.com
put=ping www.u-tokyo.ac.jp
tut=tracert www.u-tokyo.ac.jp
pjls=ping www.johnlscott.com
tjls=tracert www.johnlscott.com
ta=tracert www.aplushosting.com
pa=ping www.unisa.edu.au
pb=ping news.fu-berlin.de
tb=tracert news.fu-berlin.de
pl=ping www.lon.ac.uk
tl=tracert www.lon.ac.uk
pg=ping google.com
tg=tracert google.com
pp=ping aplushosting.com
tp=tracert aplushosting.com
pr=ping www.rcblue.com
tr=tracert www.rcblue.com
ps=ping spro.net
ts=tracert spro.net
:: $b used like the pipe symbol ("|") in UNIX
:: see http://www.vfrazee.com/ms-dos/6.22/help/doskey.htm
ip=ipconfig/all $b more
mac=doskey /macros $b more
===================================

Which 2 are ill-formed?

I just realized that I could probably find the 2 culprits by comparing
the lines of the doskeymacros.txt with the macros that are listed when I
excecute the "mac" macro. Turned out that that 2 of the 3 commented out
lines,

:: $b used like the pipe symbol ("|") in UNIX
:: see http://www.vfrazee.com/ms-dos/6.22/help/doskey.htm

didn't appear. So I deleted these from doskeymacros.txt, rebooted, and I
no longer get the double "invalid macro definition".

Problem solved, but I'm curious as to why a commented-out line would
cause a problem.

Jack
 
M

Malke

Jack said:
I just realized that I could probably find the 2 culprits by comparing
the lines of the doskeymacros.txt with the macros that are listed when I
excecute the "mac" macro. Turned out that that 2 of the 3 commented out
lines,

:: $b used like the pipe symbol ("|") in UNIX
:: see http://www.vfrazee.com/ms-dos/6.22/help/doskey.htm

didn't appear. So I deleted these from doskeymacros.txt, rebooted, and I
no longer get the double "invalid macro definition".

Problem solved, but I'm curious as to why a commented-out line would
cause a problem.

Since you are using the same .txt file for both Mac and PC, you probably
have the line ending format wrong for the PC. The default in Mac is to
use line endings for OS X/Unix. If you have a lot of scripts that you
share between the Mac and PC you should use the PC-compatible line
ending format instead.


Malke
 
J

Jack Crane

Since you are using the same .txt file for both Mac and PC, you
probably have the line ending format wrong for the PC. The default in
Mac is to use line endings for OS X/Unix. If you have a lot of scripts
that you share between the Mac and PC you should use the PC-compatible
line ending format instead.

No, I'm not using a Mac. By "mac" I meant the doskey macro in my list.
Calling that macro will list all the useable macros that are set.

Jack
 
M

Malke

Jack said:
No, I'm not using a Mac. By "mac" I meant the doskey macro in my list.
Calling that macro will list all the useable macros that are set.

Sorry for the misunderstanding then.

Malke
 
Top