Subject: | |
From: | |
Reply To: | |
Date: | Sun, 29 Oct 1995 12:49:37 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hello,
I am trying to write a program that will alow me to use an alias with the
SEND command. To do this, I am trying to modify a program that Kent Covert
gave me a while back that lets you use aliases with the FINGER command. It
sort of works, but it only sends the first word of the message. It also
can't enter the SEND program (where you don't have to type the id again). I
could get around this easily enough by using a separate program, but that
is a rather klunky approach; it would be really nice if I could do it all in one
compact program. But I have no idea how to get past the one word problem. Here
is the source code:
$! NewSend.COM
$!
$! Initialization
$!
$ sendAddress = f$edit(p1,"lowercase")
$!
$! Try to find sendAddress in aliases.dat file.
$!
$ open/read/error=doSend aliasFile sys$login:aliases.dat
$ read aliasFile aliasRecord/index=0/key="''f$fao("!80AS",sendAddress)'"-
/error=doSend
$ addressSize = f$cvui(0,8,f$extract(80,1,aliasRecord))
$ sendAddress = f$extract(82,addressSize,aliasRecord)
$!
$! Close Alias File
$!
$closeAliasFile:
$ close aliasFile
$!
$! Issue Send command
$!
$doSend:
$ send 'sendAddress 'f$edit(p2, "lowercase")
$!
$! Exit Program
$!
$done:
$ exit
I know the problem lies with using 'p2' in the send command, but I am not sure
how to tell it to use all remaining arguments (I'm sorry if this is really
basic, but I am pretty clueless when it comes to VMS programming--it's just not
the same as mac programming :-). And I still have no idea how to write it so
it'll just issue a SEND [userID] command when there is no message (maybe the two
problems are linked somehow?).
Any help is is appreciated with this.
Thanks in advance.
Regards,
Bob
--
Robert E. Williams, Jr. | The computer programmer's worst nightmare:
Macintosh Developer |
Enterprise Software | Unwittingly finding compiler bugs.
___________________________________________________________________
[log in to unmask] [log in to unmask]
[log in to unmask] http://miavx1.muohio.edu/~williar2
|
|
|