[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
Pnews, at least at my site, has a certain order of for its queries;
first it asks for the newgroup(s), then distribution, then subject,
then 'are you really sure', then included file, and then, finally,
default editor. The last three are hard coded in my macro so that in
effect, the answers are yes, none, and vi. What the macro actually
answers is 'y' and then two carriage returns.
The first three queries are ever changing. To make execution simple,
the first three lines of the IPxx file answer these three questions.
So it would look like this:
comp.sys.apple2.marketplace
na
IIgs keyboard forsale
Lines 4-end of the IPxx file are the content of the message.
The macro then sends the message and returns to the shell prompt,
where if there is another message to post, it goes through the
process all over again.
It beeps when it is done.
Thats pretty much it.
A few caveats:
(1) Due to the way PT handles the 'input' command, all lines must be
ended with a 'line format'. As using the return key makes
corrections difficult (for spacing), when you have finished composing
the message, just select 'Select All' from the Edit bar and then
select 'Line Format'.
(2) Another quirk, in the 'More' screen of the 'Preferences' screen,
the 'Allow editor to save ruler' must be unchecked. I guess this
could be handled by the macro (by just ignoring the first line of the
file, but I only just thought of that now). Hmm.
(3) There are no error allowances. If the file is formatted
incorrectly or if the site is not accepting news posts, the macro
will just hang. No problem, just hit <esc>. This macro was written
for me and no one else so I did not take this into consideration.
The macro was not meant for unattended operation but assuming the
inputter (me) has not made a mistake, the macro runs smoothly.
(4) You will have to modify the macro for your own use, especially
the pathnames and shell prompts.
(5) Just found this one, the macro shuts down while trying to post
this file. It gets all the way to the end, but does not issue the
send command. Maybe the exit is doing something. I do not know.
------------ cut here ----------
print #2,"^M"
pr #2 "This Macro will Post Files from /ww/up.down.loads/aaa.replies/"
pr #2 "^M"
pr #2 "that begin with the letter code IP using the Pnews command."
set &1="IP"
print #2,"^M"
print #2,"Input Number of First File= "
input #2,"%D",$1
print #2,"^M"
print #2,"Input Number of Last File = "
input #2,"%D",$2
print #2,"^M"
print #2,"^M"
while !(GT $1,$2),{
pr "Pnews^M";execute Pnews program
set &2=<format"%s%d",&1$1>;changes numeric variable to string
open #5,"/ww/up.down.loads/aaa.replies/"+&2;open file
wt "Newsgroup(s):";waiting for Pnews prompt
input #5,"%s",&0;input first line of file which is newsgroup(s)
pr &0+"^M";print first line of file
wt "tion ():";waiting for Pnews prompt
wt 1
input #5,"%s",&0;input second line of file which is distribution
pr &0+"^M";print line of file
wt "Title/Subject:";waiting for Pnews prompt
input #5,"%s",&0;input third line of file which is Title/Subject
pr &0+"^M";print line of file
wt "[ny]";waiting for Pnews prompt - Are you really sure
pr "y^M";printing affirmative
wt "[none]";waiting for file to include - return means no included file
pr "^M"
wt "/vi]:";vi is my default editor - return accepts
pr "^M"
wt "words:";waiting for last line of header
pr "^d";vi cmmd: scroll forward half page
wt 1
pr "a";vi cmmd: append after cursor
wt 1
while !(EO #5),{;while not at end of file
input #5,"%s",&0;load a line of text into &0
pr &0+"^M";and then print line of text
};end of code block
close #5;closes file
pr "****bpvh Internet: bpvh@msn.fullfeed.com GEnie: B.VONHADEN****^M"
pr "****Posted by an Apple IIgs using my own Proterm 3.1 File Macro****^M"
pr"^[";vi cmmd: esc - escape from text entry
pr "ZZ";vi cmmd: save and print
wt "List?";waiting for send prompt
pr "Send^M";Pnews cmmd: send letter
wt "bash$";waiting for shell prompt - bash$ is mine
wt 1
set $1=$1+1
}
bp 0
exit
------------ cut here ----------
****bpvh Internet: bpvh@msn.fullfeed.com GEnie: B.VONHADEN****
****Posted by an Apple IIgs using my own Proterm 3.1 File Macro****