home *** CD-ROM | disk | FTP | other *** search
- ;; Console Demo
- ;; A Scripit script demoing console control facilities in Scripit.
- ;;
- ;; By: Khalid Aldoseri.
- ;;
- ;; Requires Scripit 1.00b or higher.
-
-
- BEGIN
- ;; Open a console using the provided settings.
- con open "CON:25/25/520/150/Scripit Console Demo!"
- ;; Set color to 3 and style to 1 (bold).
- con style 33;1
- ;; Move cursor to 8,20
- con move 8,20
- ;; Type some text here.
- con echo "Scripit Console Control Demo"
- con move 11,20
- ;; Reset style to 0 (normal)
- con style 0
- con text "Normal "
- ;; Change style to 1 (bold)
- ;; Note: You should always reset the style by using 0; then then new style
- con style 0;1
- con text "Bold "
- ;; Change style to 3 (italic)
- con style 0;3
- con text "Italic "
- ;; Change style to 4 (underline)
- con style 0;4
- con text "Underlined"
- wait
- ;; Turn cursor off.
- con cursoroff
- ;; Move to top of console.
- con move
- wait 50
- ;; Turn cursor on, wait, then off again.
- con cursoron
- wait
- con cursoroff
- ;; Move to line 11
- con move 11,0
- ;; Delete 2 characters from here.
- con delchar 2
- wait 20
- ;; Move to 11,24
- con move 11,24
- ;; Insert 1 space
- con inschar
- wait 20
- ;; Move cursor to the right 7 times
- con right 7
- con inschar
- wait 20
- con right 8
- con inschar
- wait 20
- ;; Scroll all lines up 6 times.
- con scrollup 6
- wait 20
- ;; Scroll all lines down 10 times.
- con scrolldown 10
- wait 20
- con scrollup 10
- wait 20
- con scrolldown 10
- wait 20
- con scrollup 10
- con move 9,3
- con style 0;3
- con text "Scripit"
- con style 0
- con echo " can control consoles via a simple command language."
- wait
- con move 11,0
- con echo " Its commands can open/close consoles, clear, echo text,"
- con echo " move the cursor to any specific place, or step by step,"
- con echo " scroll the text up or down, insert & delete characters"
- con echo " and lines, turn the cursor on and off, change the style"
- con echo " (normal, bold, italic or underline) or any combination"
- con echo " of those, or even change the text color!"
- wait 500
- con move 0,0
- con scrolldown 10
- con scrollup 6
- con move 12,28
- con style 0;2
- con echo "End of demo!"
- con move 15,16
- con style 0;1
- con echo "Hit Control+Left Mouse button to end."
- wait 2000
- ;; Close the console.
- ;; Note: This is done automatically by Scripit anyway when the script
- ;; terminates.
- con close
-