home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / adial.zip / AUTODIAL.XWS next >
Text File  |  1990-07-15  |  1KB  |  51 lines

  1. /*
  2. Autodialer Script   
  3. by Steven Kieffer [72027,2532]
  4. 7/15/1990
  5. */
  6.  
  7.  
  8.  
  9. integer phone1, phone2, phone3, phone4, phone5, counter, repeat_inf
  10. integer repeat_ten
  11.  
  12. trap on
  13. repeat_ten is true
  14.  
  15. dialogbox 34,23,130,125
  16.     ltext 4,4,120,10,"AUTODIALER by Steven Kieffer"
  17.     groupbox 8,20,70,75,"Phone choices:"
  18.     checkbox 12,32,50,12,arg(1),phone1,tabstop focus
  19.     checkbox 12,44,50,12,arg(2),phone2,tabstop
  20.     checkbox 12,56,50,12,arg(3),phone3,tabstop
  21.     checkbox 12,68,50,12,arg(4),phone4,tabstop
  22.     checkbox 12,80,50,12,arg(5),phone5,tabstop
  23.     radiobutton 12,100,90,10,"Repeat infinitely",repeat_inf,tabstop group
  24.     radiobutton 12,110,90,10,"Repeat 10 times",repeat_ten
  25.     defpushbutton 85,32,36,14,"OK",ok,tabstop group
  26.     pushbutton 85,52,36,14,"CANCEL",cancel,tabstop
  27. enddialog
  28.  
  29. IF CHOICE IS 2 THEN END
  30. if null(arg(1)) then alarm : alert "No phone numbers to dial !!!",ok : end
  31.  
  32. repeat
  33.     if repeat_ten is true then counter=counter+1
  34.     if phone1 is true then call arg(1) 
  35.     if phone2 is true then call arg(2)
  36.     if phone3 is true then call arg(3)
  37.     if phone4 is true then call arg(4)
  38.     if phone5 is true then call arg(5)
  39. until counter is 10
  40.  
  41. counter is 0
  42.  
  43. repeat
  44.     counter=counter plus 1
  45.     alarm:alarm:alarm
  46.     wait 1 second
  47. until counter is 3
  48.  
  49. alert "Autodial completed. No connections made.",ok
  50. end
  51.