The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Magnum on November 02, 2011, 07:27:10 PM

Title: Script isn't working
Post by: Magnum on November 02, 2011, 07:27:10 PM
This is supposed to insert these 2 characters, but it does not work.

I want to use it to insert comments in my batch files.

Comment&9 ::,{e}\text\comment9.txt

In comment9.txt

;::
Title: Re: Script isn't working
Post by: dedndave on November 02, 2011, 07:36:17 PM
start the line with double colons - not a semicolon

::comment

this works because...
batch file lines starting with a colon are branch labels
the second colon makes it an invalid branch label - so, when the batch is processed, the line is ignored   :P
Title: Re: Script isn't working
Post by: Magnum on November 02, 2011, 07:47:38 PM
I am referring to the script capabilities within Qeditor.

Title: Re: Script isn't working
Post by: dedndave on November 03, 2011, 01:41:13 AM
Hutch is the man for that one
in the attachment of the following post, he uses semicolons...
http://www.masm32.com/board/index.php?topic=17215.msg144067#msg144067
Title: Re: Script isn't working
Post by: Tedd on November 03, 2011, 01:45:52 PM
Try the line as:

Comment&9,{e}\text\comment9.txt

and see if that works first.
If not, 'how' does it not work (what does it do?)
Title: Re: Script isn't working
Post by: Magnum on November 03, 2011, 02:53:22 PM
This is what it puts out. ??

; ::
Title: Re: Script isn't working
Post by: Magnum on November 03, 2011, 02:56:55 PM
I tried just :: in comment9, but it does not put it before the text, it makes a newline.

Before

text

--------------------------

After

::
text
Title: Re: Script isn't working
Post by: ToutEnMasm on November 03, 2011, 03:13:27 PM

REM I am a comment

Else,there is a file named ntcmds in C:\WINDOWS\Help\ntcmds.chm
Title: Re: Script isn't working
Post by: hutch-- on November 03, 2011, 03:36:55 PM
Andy,

This is the standard stuff for different types of comments.


Comment&0 «««««,{e}\text\comment0.txt
Comment&1 ¤¤¤¤¤,{e}\text\comment1.txt
Comment&2 ¤=÷=¤,{e}\text\comment2.txt
Comment&3 ÷·÷·÷,{e}\text\comment3.txt
Comment&4 ÷-÷-÷,{e}\text\comment4.txt
Comment&5 ¤*¤*¤,{e}\text\comment5.txt
Comment&6 ¤÷¤÷¤,{e}\text\comment6.txt
Comment&7 -----,{e}\text\comment7.txt
Comment&8 »»»»»,{e}\text\comment8.txt
Title: Re: Script isn't working
Post by: Magnum on November 03, 2011, 04:43:24 PM
I used this.

I want to place 2 :: in front of other text WITHOUT a newline being inserted.

It looks like Qeditor is written to insert newlines for all the text scripts.

Comment&9 :::::,{e}\text\comment9.txt

Title: Re: Script isn't working
Post by: Magnum on November 03, 2011, 04:57:06 PM
New plan.

How do I make a file with 2 colons that doesn't have the ODAH in the file.

Seems like debug can do it.

Title: Re: Script isn't working
Post by: Magnum on November 03, 2011, 05:34:27 PM
I figured out the problem.
One I removed the linefeed, it worked.

How to edit a text file to remove linefeeds (0DAH)

edit /50 <name of text file>

Delete any linefeeds 
Title: Re: Script isn't working
Post by: Magnum on November 04, 2011, 12:48:14 AM
Another way from a batch file guru.

set /p 0=::<nul>dblcolon.txt