home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR10 / TLXTW110.ZIP / HANGUP.SLT < prev    next >
Text File  |  1993-08-22  |  2KB  |  80 lines

  1. int     flag = 0, statline, statline_color, h, i, Len, x, y;
  2. str     bbsname[15],  c[64];
  3.  
  4. main()
  5. {
  6.  flushbuf();
  7.  _scr_chk_key = 0;
  8.  _back_color = 0;
  9.  _fore_color = 7;
  10.  // reset script directory
  11.  _script_dir = "c:\telix\work\slc\";                                         //
  12.  //////////////////////////////////////////////////////////////////////////////
  13.  // _down_dir="c:\telix\work\dl\";                 // reset download dir
  14.  i = keyload("telix.key");                         // reload default .key file
  15.  if ( i != -1 ) printsc("^M^JTelix.key loaded." );
  16.  printsc("^M^JScript directory:  ");
  17.  printsc( _script_dir );
  18.  prints("");
  19.  update_term();
  20.  newdir(_telix_dir);
  21.  x=getx(); y=gety();
  22.  if (chk_stat(0) == -1)
  23.  chk_stat(24);
  24.  pstraxy("                                                      │", 0, statline, statline_color);
  25.  gotoxy(x,y);
  26.  if ( capture_stat() == 1 || capture_stat() == 2 )
  27.    {
  28.      subchrs(_capture_fname, 0, strlen(_capture_fname), c); strcat(c, " closed");
  29.      Len = 40 - strlen(c) / 2 ;
  30.      capture ( "*close*" );
  31.      h = vsavearea(Len - 4, 15, Len + strlen(c) + 3, 17);
  32.      box(Len - 4, 15, Len + strlen(c) + 3, 17, 3 ,0 ,31);
  33.      pstraxy( c, Len, 16, 30);
  34.    }
  35. ///////////////////////////////////////////////////////////////////////////////
  36. // reset default capture file name
  37. _capture_fname = "d:\cap";                                                   //
  38. ///////////////////////////////////////////////////////////////////////////////
  39.  if ( carrier() )
  40.  {
  41.    i=0;
  42.    while( i == 0 && inkey() != 27 )
  43.    {
  44.     i=hangup();
  45.     if(i > 0) break;
  46.     vrstrarea(h);  gotoxy( 0, y );
  47.     delay_scr(10);
  48.     cputs_tr(_mdm_hang_str);
  49.     if (waitfor("OK", 3) ) break;
  50.     delay_scr(5);
  51.    }
  52.  }
  53.  vrstrarea(h); // gotoxy( 0, y );
  54.  // substr(_entry_name, 0, 15, bbsname);
  55.  pstraxy( _entry_name, 0, statline, statline_color);
  56.  gotoxy(0, y);
  57.  while ( inkey() != 27 )
  58.   {
  59.     cputs_tr(_mdm_init_str);
  60.     if ( waitfor("OK", 2 )) break;
  61.     delay_scr(2);
  62.   }
  63.  cursor_onoff(1);
  64.  _scr_chk_key = 1;
  65.  return;
  66. }
  67. ///////////////////////////////////////////////////////////////////////////////
  68. //                  Check Row and Color of Status Line
  69. chk_stat ( int statchk )
  70. {
  71.   gotoxy(67, statchk);
  72.   if ((vgetchr() & 255) == 79 )
  73.     {
  74.      Statline = statchk;
  75.      statline_color = vgetchr()/256;
  76.     }
  77.  else return(-1);
  78. }
  79. ///////////////////////////////////////////////////////////////////////////////
  80.