; DEMO.SCR ; ; KiXtart test script. ; ; 24-Aug-1995 ; ; Note : This code sample is provided for demonstration purposes only. ; Microsoft makes no warranty, either express or implied, ; as to its usability in any given situation. ; break ON :start cls color g+/n at ( 6,10) "a. demo Play" at ( 7,10) "b. demo Sleep" at ( 8,10) "c. demo box / big / color" at ( 9,10) "d. display standard Macro's" at (10,10) "e. display LAN Macro's" at (11,10) "f. demo Env / Shell" at (12,10) "g. demo Use" at (13,10) "h. Call RECUR" at (14,10) "i. demo Loop" color w/n at (16,10) "Enter a-i or 'Q' to quit" do get $jump until $jump = 'Q' or ($jump >='a' and $jump <= 'i') if $jump = 'Q' goto end endif goto $jump ; "variable goto", neat, hmm ? :-) :a ; Play cls ? "Demo Play..." ? "Demo 1 : KiXtart will play JBOND.SPK after you press a key..." get $x if exist("jbond.spk") play file "jbond.spk" else ? "Sorry, JBOND.SPK appears to be missing." ? "However, I'll play the first few notes from memory :-)" PLAY " 0g256t 0g8d247f 4d165f 247f 8d262f 4d165f 262f 8d277f 4d165f 277f 8d262f 4d165f 262f 8d247f 4d165f 247f 8d262f 4d165f 262f 8d277f 4d165f 277f 8d262f " endif ? ? "Demo 2 : KiXtart will play CHIMES.WAV after you press a key..." get $x if exist("chimes.wav") play file "chimes.wav" else ? "Sorry, CHIMES.WAV appears to be missing." endif at (23,0) " to continue..." get $x goto start :b cls ? "Demo 1 : KiXtart will sleep 3 seconds after you press a key..." get $x ? "(Start time : @time)" sleep 3 ? "(End time : @time)" ? "Demo 2 : KiXtart will sleep 30 seconds after you press a key..." get $x ? "(Start time : @time)" sleep 30 ? "(End time : @time)" at (23,0) " to continue..." get $x goto start :c cls color w/n at(0, 1) '"single"' color b/n BOX(1, 0,4, 8,single) color w/n at(0,12) '"double"' color g/n BOX(1,11,4,19,double) color w/n at(0,23) '"grid"' color c/n BOX(1,22,4,30,grid) color w/n at(0,34) '"full"' color r/n BOX(1,33,4,41, full) color w/n at(0,46) '""' color m/n BOX(1,44,4,52, "") color w/n at(0,54) '"abcdefgh "' color y/n BOX(1,55,4,63,"abcdefgh ") color w/n at(0,66) '"abcdefghi"' color w/n BOX(1,67,4,75,"abcdefghi") color w+/n at ( 6, 0) big "BIG big" color g+/n at (11,62) small "SMALL small" color w/n at (15,0) "b/n" color b/n at (15,7) "þ" color w/n at (15,15) "b+/n" color b+/n at (15,22) "þ" color w/n at (16,0) "g/n" color g/n at (16,7) "þ" color w/n at (16,15) "g+/n" color g+/n at (16,22) "þ" color w/n at (17,0) "c/n" color c/n at (17,7) "þ" color w/n at (17,15) "c+/n" color c+/n at (17,22) "þ" color w/n at (18,0) "r/n" color r/n at (18,7) "þ" color w/n at (18,15) "r+/n" color r+/n at (18,22) "þ" color w/n at (19,0) "m/n" color m/n at (19,7) "þ" color w/n at (19,15) "m+/n" color m+/n at (19,22) "þ" color w/n at (20,0) "y/n" color y/n at (20,7) "þ" color w/n at (20,15) "y+/n" color y+/n at (20,22) "þ" color w/n at (21,0) "w/n" color w/n at (21,7) "þ" color w/n at (21,15) "w+/n" color w+/n at (21,22) "þ" color w/n at (23,0) " to continue..." get $x goto start :d cls color g+/n "Display standard macro's..." color g/n at ( 3,1) "DATE" at ( 4,1) "TIME" at ( 5,1) "DAY" at ( 6,1) "MDAYNO" at ( 7,1) "WDAYNO" at ( 8,1) "YDAYNO" at ( 9,1) "MONTH" at (10,1) "MONTHNO" at (11,1) "YEAR" at (12,1) "DOS" color w+/n at ( 3,12) @DATE at ( 4,12) @TIME at ( 5,12) @DAY at ( 6,12) @MDAYNO at ( 7,12) @WDAYNO at ( 8,12) @YDAYNO at ( 9,12) @MONTH at (10,12) @MONTHNO at (11,12) @YEAR at (12,12) @DOS color w/n at (23,0) " to continue..." get $x goto start :e cls color g+/n "Display LAN macro's..." color g/n at ( 3,1) "ADDRESS" at ( 4,1) "COMMENT" at ( 5,1) "DOMAIN" at ( 6,1) "FULLNAME" at ( 7,1) "HOMEDIR" at ( 8,1) "HOMESHR" at ( 9,1) "LANROOT" at (10,1) "LDOMAIN" at (11,1) "LDRIVE" at (12,1) "LM" at (13,1) "LSERVER" at (14,1) "MAXPWAGE" at (15,1) "PRIV" at (16,1) "PWAGE" at (17,1) "USERID" at (18,1) "WKSTA" color w+/n at ( 3,12) @ADDRESS at ( 4,12) @COMMENT at ( 5,12) @DOMAIN at ( 6,12) @FULLNAME at ( 7,12) @HOMEDIR at ( 8,12) @HOMESHR at ( 9,12) @LANROOT at (10,12) @LDOMAIN at (11,12) @LDRIVE at (12,12) @LM at (13,12) @LSERVER at (14,12) @MAXPWAGE at (15,12) @PRIV at (16,12) @PWAGE at (17,12) @USERID at (18,12) @WKSTA color w/n at (23,0) " to continue..." get $x goto start :f cls ? "Test : 'Environment vars. / Shell'" setl "Kixtest=" ? "Please verify Kixtest= variable is empty / absent, then press anykey" ? ? shell "command.com /c set" get $x cls setl "Kixtest=tsetxiK" if @error ? "Hmmm, apparently, there aren't enough bytes available in the environment.." ? "press to return to menu..." get $x else ? "Please verify PREsence of the Kixtest= variable, then press anykey" ? ? shell "command.com /c set" get $x setl "Kixtest=" endif goto start :g cls ? "Test : USE (LIST)" use list ? "Verify V: isn't redirected, then press" ? "anykey to redirect V: to '@@LSERVER\NETLOGON'" get $x use v: /d use v: "@lserver\netlogon" if @error ? "Ohoh, redirect failed with errorcode : " + @error else use list ? "Verify that V: is indeed redirected," ? "then press anykey to remove the redirection" get $x use v: /d use list ? "Verify that V: is no longer redirected" endif ? "press anykey to return to the menu" get $x goto start :h cls ? "Test : CALL command. Press anykey to CALL RECUR.SCR." cls ? "Press anykey for next level or 'Q' to quit" Call "RECUR.SCR" ? "Returned to main script. Press anykey to return to the menu" get $x goto start :i cls Call "FLY.SCR" ? "Returned to main script. Press anykey to return to the menu" get $x goto start :end IF @ERROR ? "@@ERROR = @error" ENDIF ? "end"