home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / WINDOWS / COMM / WINCOMM5.ZIP / ANSI1.WMS < prev    next >
Encoding:
Text File  |  1990-10-20  |  1.6 KB  |  61 lines

  1. ;PlayBack of ansi files demo
  2.  
  3. USERWINDOW(5,0,0,2500211)
  4. METABKG(0,0,1,"synapp.wmf")      ;displays the SYNAPPSYS logo
  5. show(6)
  6. STOP                             ;stops a session if started
  7. len = 2
  8. GOSUB pause
  9.    DIALOGBOX 50, 50, 229, 60, 21, "ANSI Color Terminal Demonstration"
  10.       LTEXT 8, 8, 213, 19, "This part of the demonstration will replay a file that contains color ANSI escape sequences.  The file is ANSI.EMU."
  11.       DEFCANCELBUTTON 83, 31, 50, 15, "&OK"
  12.    DEND
  13. dtime = 10
  14. gosub delay
  15.  
  16. open("ansi.wsf","",1)           ;opens the session file setup with ANSI BBS terminal type selected
  17. len = 2
  18. DELOBJECT(0,0,0)                    ;clears the graphic
  19. show(8)
  20. key1 = 0
  21. key = 38
  22.  
  23.  
  24. len = 1
  25. sendspeckey(1,0,asc("F"))       ; 1 == alt key, selects the FILE menu
  26. gosub pause
  27. sendspeckey(0,0,asc("Y"))       ;selects the Playback menu item
  28. gosub pause
  29. sendspeckey(0,0,asc("A"))       ;types ANSI.EMU in the edit box
  30. sendspeckey(0,0,asc("N"))
  31. sendspeckey(0,0,asc("S"))
  32. sendspeckey(0,0,asc("I"))
  33. sendkey(".")
  34. sendspeckey(0,0,asc("E"))
  35. sendspeckey(0,0,asc("M"))
  36. sendspeckey(0,0,asc("U"))
  37. gosub pause
  38. sendspeckey(0,0,13)             ; send carrage return
  39.  
  40. HALT
  41.  
  42. pause:
  43. i = time?+len
  44. while(time? <i)
  45. wend
  46. return
  47.  
  48.  
  49. delay:                          ;automatically destroys the dialog box by 
  50. i = time?+dtime                 ;sending a carrage return after a timeout
  51. j = 255                         ;if the CONTINUE button is not selected beforehand
  52. while((time?<i) && (j == 255))
  53. j = DIALOG?
  54. wend
  55. if(j == 255)
  56.   sendspeckey(0,0,13)
  57. return
  58.  
  59. END
  60.  
  61.