home *** CD-ROM | disk | FTP | other *** search
- ;PlayBack of ansi files demo
-
- USERWINDOW(5,0,0,2500211)
- METABKG(0,0,1,"synapp.wmf") ;displays the SYNAPPSYS logo
- show(6)
- STOP ;stops a session if started
- len = 2
- GOSUB pause
- DIALOGBOX 50, 50, 229, 60, 21, "ANSI Color Terminal Demonstration"
- 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."
- DEFCANCELBUTTON 83, 31, 50, 15, "&OK"
- DEND
- dtime = 10
- gosub delay
-
- open("ansi.wsf","",1) ;opens the session file setup with ANSI BBS terminal type selected
- len = 2
- DELOBJECT(0,0,0) ;clears the graphic
- show(8)
- key1 = 0
- key = 38
-
-
- len = 1
- sendspeckey(1,0,asc("F")) ; 1 == alt key, selects the FILE menu
- gosub pause
- sendspeckey(0,0,asc("Y")) ;selects the Playback menu item
- gosub pause
- sendspeckey(0,0,asc("A")) ;types ANSI.EMU in the edit box
- sendspeckey(0,0,asc("N"))
- sendspeckey(0,0,asc("S"))
- sendspeckey(0,0,asc("I"))
- sendkey(".")
- sendspeckey(0,0,asc("E"))
- sendspeckey(0,0,asc("M"))
- sendspeckey(0,0,asc("U"))
- gosub pause
- sendspeckey(0,0,13) ; send carrage return
-
- HALT
-
- pause:
- i = time?+len
- while(time? <i)
- wend
- return
-
-
- delay: ;automatically destroys the dialog box by
- i = time?+dtime ;sending a carrage return after a timeout
- j = 255 ;if the CONTINUE button is not selected beforehand
- while((time?<i) && (j == 255))
- j = DIALOG?
- wend
- if(j == 255)
- sendspeckey(0,0,13)
- return
-
- END
-
-