Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!newsfeed.news2me.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp3.aus1.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail
NNTP-Posting-Date: Mon, 27 Jan 2003 05:05:53 -0600
Reply-To: "E.S.Fabian"
From: "E.S.Fabian"
Newsgroups: alt.msdos.batch,fido.4dos,comp.os.msdos.4dos,comp.os.msdos.misc
References:
Subject: Re: Read txt file into W95 clipboard line by line?
Date: Mon, 27 Jan 2003 06:05:52 -0500
Message-ID:
Lines: 36
NNTP-Posting-Host: 68.45.120.86
Xref: archiver1.google.com alt.msdos.batch:29468 fido.4dos:17 comp.os.msdos.4dos:3262 comp.os.msdos.misc:9821
wrote in message news:le2a3vga87s79fuinrn2h996bkcrb3nv2q@4ax.com...
> Is there a way to read one line of a text file at a time into the
> windows clipboard? I also have 4dos, so I could use that if it can't
> be done in regular dos, or windows' bastardized dos.
>
> I've got Macro Mania and I'm trying to make a loop that'll read one
> line from a file, put it in the clipboard, paste it, do some other
> stuff, then read the next on, etc.
> I know it can be done cause I did it before long ago, but I can't
> remember how!!
In 4DOS you can read specific lines from the clipboard with the @clip[n] function, and write to it using the @clipw[string]
function. You can also redirect the standard output of any internal or external command using "> CLIP:" or ">> CLIP:".
The best way to process each line of a file AAA.TXT is
do %line in @AAA.TXT
... process each line
enddo
Beware of using the clipboard when any "scheduled tasks" might also do it! The clipboard in NOT dedicated to a single task.
Also beware of using 4DOS (or any other JP Software command processor, or COMMAND.COM, or CMD.EXE) to do text processing, if the
text might contain the characters %,&,$,,^ etc. - i.e., any character which the command processor might consider syntactically
significant. In JP command processors you can partially disable those special meanings with the various suboptions of the /X option
of the SETDOS command, which may or may not be adequate for your purposes.
JP command processors create temporary files in the %temp directory when accessing the clipboard. These files are NOT removed.
--
E. S. "Steve" Fabian ESFabian@BellAtlantic.net
Telephone: 856-354-1752 POB 1540, Cherry Hill, NJ 08034
-------------------------------------------------------------------
|