home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
pmcom233.zip
/
SAMPLE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1996-01-02
|
2KB
|
38 lines
/*This script can be compiled with either the cpmcom32.lib or the */
/*cpmcomm.lib. If you are compiling the program as a 32bit program then use */
/*the cpmcom32.lib. This script will dial the entry in your dialing directory*/
/*named Compu-Plane. Make sure this entry exists. Replace the first,last, and*/
/*password fields in the put_s statements. The cpmcomm.lib is a large model */
/*library.*/
#include <stdio.h>
#include "cpmcomm.h"
int main(int argc,char **argv)
{
CHAR *filearray[1];
if(!init_lib(argc,argv)) /*This function initializes certain variables */
{ /*for use by the .lib functions. */
printf("Error in init_lib!\a\n");
sleep(5000);
return(1);
}
change_option("exit on hangup=ON"); /* This will make Pmcomm exit once */
/* you have logged off from the BBS.*/
put_s("Dialing Compu-Plane\r\n\n", screen_handle);
sleep(1000);
dial("Compu-Plane"); /*This function will dial the entry Compu-Plane*/
/*in your dialing directory. This entry must */
/*exist in order for this script to work. */
filearray[0] = "name?";
wait_fore(1, filearray, port, screen_handle); /*Wait for the word name? */
put_s("first\r", port); /*Replace the word first with your first name. */
wait_fore(1, filearray, port, screen_handle); /*Wait for the word name? */
put_s("last\r", port); /*Replace the word last with your last name. */
filearray[0] = "password?";
wait_fore(1, filearray, port, screen_handle); /*Wait for the word password? */
put_s("password\r", port); /*Replace the word password with your password*/
return(0);
}