home *** CD-ROM | disk | FTP | other *** search
- // Copyright 1992, FutureSoft Technologies.
- // For use with InComm:PcPDial, release 1.0.0
- // Feel free to use and modify this script however you see fit.
-
- main()
- {
- int f;
- int t;
- int keypress;
- str connectfile[80];
- str dialername[13];
- str cmdline[14];
- str connected[61];
- str name[31];
- str script[13];
- str date_str[21];
- str time_str[21];
-
- // Open log file
-
- usagelog("PCP.LOG");
-
- // Main menu
-
- box(20,10,50,13,2,0,112);
- cursor_onoff(0);
- pstraxy("1) Manager",21,11,112);
- pstraxy("2) Dialer",21,12,112);
- pstraxy("3) Manager Auto",34,11,112);
- pstraxy("4) Exit",34,12,112);
-
- // Get user's choice
- keypress = inkeyw();
- clear_scr();
- cursor_onoff(1);
-
- // Manager
- if (keypress == '1') {
- run("manager","",0);
- }
-
- // Dialer
- else if ((keypress == '2') || (keypress == '3')) {
-
- // Change next line to reflect your Dialers Path
- // Keep the "connect.ic" portion intact.
-
- fdelete("C:\InComm\dialers\connect.ic");
-
- // Change next line to reflect your Dialers Path
- // Keep the "*.cmd" portion intact.
-
- show_directory("C:\Incomm\Dialers\*.cmd");
- clear_scr();
- box(30,11,65,13,2,0,112);
- pstraxy("Enter command file : ",31,12,112);
- getsxy(dialername,12,52,12,112);
- copystr("@",cmdline,0,1);
- strcat(cmdline,dialername);
- clear_scr();
- if (keypress == '2')
- run("dialer",cmdline,0);
- else
- run("manager",cmdline,0);
-
- // Change next line to reflect your Dialers Path
- // Keep the "connect.ic" portion intact.
-
- copystr("C:\InComm\dialers\connect.ic",connectfile,0,100);
-
- f = fopen(connectfile,"r");
- if (f != 0) {
- fgets(name,100,f);
- fgets(script,100,f);
- fclose(f);
-
- copystr("Connected to : ",connected,0,15);
- strcat(connected,name);
- status_wind(connected,30);
-
- t = curtime();
- time(time_str,t);
- date(date_str,t);
- strcat(date_str," ");
- ustamp(date_str,1,0);
- ustamp(time_str,0,0);
- ustamp(connected,0,1);
-
- call(script,connectfile);
- }
- }
- }
-