home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / AUTOPAGE.SCR < prev    next >
Text File  |  1992-12-07  |  2KB  |  47 lines

  1. ;This script file runs under LogiCOMM for OS/2
  2. ;It waitsuntil something happens on COM1
  3. ;Then dials your pager on COM2
  4. ;Dials 999 and the time of the call for your pager to display.
  5. ;If you don't have two modems increase the waiting time n0% and
  6. ;change the SET COM 2 to SET COM 1.
  7. ;If anybody has an idea how to get the values of S-registers into the script
  8. ;file let me know.  Would make this program much better.
  9. ;Any questions send to
  10. ;Oliver Schubert
  11. ;P.O.Box 90134
  12. ;Henderson, NV 89009
  13.  
  14. assign n0% 10                          ;Waiting time from time of ring until
  15.                                        ;Modem dials pager.
  16. set port "COM1"                        ;Monitor COM1
  17. transmit "ats11=255^M"                 ;Dial very slow
  18. pause 5                                ;Wait 5 seconds for port to clear
  19. clrscreen                              ;Clear Screen
  20. alarm 1                                ;Sound alarm for 1 second
  21.  
  22. repeat                                 ;Loop forever
  23.   repeat                               ;Loop until something happens at COM1
  24.     if keypressed
  25.       exit                             ;Leave program if key is pressed
  26.     endif
  27.  
  28.     time$ s0$                          ;Remember time
  29.     putstring s0$ 0 0 1                ;Display time at 0,0 in blue
  30.     remoteget s0$ 4 5                  ;Wait for something to happen at COM1
  31.  
  32.   until successful                     ;If no time out of remoteget
  33.  
  34.   time$ s1$                            ;Get time
  35.   message s1$                          ;Display time
  36.   set port "COM2"                      ;Change to second modem on COM2
  37.   pause n0%                            ;Wait 10 seconds
  38.   assign s2$ "atdt4745678,,,,,,999"    ;Create dialing string
  39.   strcat s2$ s1$                       ;append time to dialing string
  40.   strcat s2$ "#,^M"                    ;append # and CR to dialing string
  41.   transmit s2$                         ;Dial Pager
  42.   pause 2                              ;Wait 2 seconds
  43.   hangup                               ;Hangup
  44.   set port "COM1"                      ;Set port back to COM2
  45.  
  46. until FALSE                            ;loop forever
  47.