[Moderator (Sealeopard): Moved thread from 'Scripts' to 'General' forum]

Dear,

After the upgrade of this site the presentation of our previous topic wasn't
the same.
The link to the old version (= size +/- 270 KBytes) is:

http://kixtart.org/board/Forum2/HTML/000642.html kixstrip.exe

This link is the new one, but the layout isn't correct.

http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=2&t=000642

This new entry will continu the story about this tool.
Two versions are available on our site http://home.wanadoo.nl/scripting
  • kixstrip363.exe using the keywords of KiXtart 3.63 release
  • kixstrip400.exe using the keywords of KiXtart 4.00 release
The version at the moment is 2.27.
What is new for this version:
  • the option /Debug shows not only
    "which line was executed" and "what was the time of execution", but
    also "what is the kixtart error status" by using the macros
    @error and @serror.
    Also a starting remark was inserted.
  • the options /Progress and /Performance doesn't
    show an unused kixtart header code.
An example of kixstrip.exe input.kix output.kix /debug /show_structurecan be. We have use our script cpu.kix.
code:
                                            CLS
AT (1,1) " "
IF RedirectOutput("t:\kix-info.log")
ENDIF
? "-"+@date+" "+@time+"- Script "+@kix+" starting."
?"- 1-"+@time+"- @error @serror "? IF setconsole("hide")
?"- 2-"+@time+"- @error @serror "? ENDIF
?"- 3-"+@time+"- @error @serror "? ;
?"- 4-"+@time+"- @error @serror "? ; NT/95 calculates cpu type + processor speed - Kixtart 3.63, 4.00
?"- 5-"+@time+"- @error @serror "? ;
?"- 6-"+@time+"- @error @serror "? ; (c) scripting@wanadoo.nl - 2001
?"- 7-"+@time+"- @error @serror "? ;
?"- 8-"+@time+"- @error @serror "? ; vs 1.01 - program
?"- 9-"+@time+"- @error @serror "? ;
?"- 10-"+@time+"- @error @serror "? ; 1.00 (20010525) original version.
?"- 11-"+@time+"- @error @serror "? ; 1.01p (20010525) add - warning message by missing external program
?"- 12-"+@time+"- @error @serror "? ;
?"- 13-"+@time+"- @error @serror "? ; external programs: cpu.exe
?"- 14-"+@time+"- @error @serror "? ;
?"- 15-"+@time+"- @error @serror "? $prgrm_version="1.01"
?"- 16-"+@time+"- @error @serror "? ;
?"- 17-"+@time+"- @error @serror "? $tmp_directory=ExpandEnvironmentVars("%tmp%")
?"- 18-"+@time+"- @error @serror "? IF (substr($tmp_directory,len($tmp_directory),1) = "\")
?"- 19-"+@time+"- @error @serror "? $tmp_directory=substr($tmp_directory,len($tmp_directory)-1)
?"- 20-"+@time+"- @error @serror "? ENDIF
?"- 21-"+@time+"- @error @serror "? $cpu_file=$tmp_directory+"\kix-cpu.tmp"
?"- 22-"+@time+"- @error @serror "? ;
?"- 23-"+@time+"- @error @serror "? IF (@inwin = 1)
?"- 24-"+@time+"- @error @serror "? $nt_mode="yes"
?"- 25-"+@time+"- @error @serror "? ELSE
?"- 26-"+@time+"- @error @serror "? $nt_mode="no"
?"- 27-"+@time+"- @error @serror "? ENDIF
?"- 28-"+@time+"- @error @serror "?
?"- 29-"+@time+"- @error @serror "? ; ---------------------------------------------------------------------------
?"- 30-"+@time+"- @error @serror "? ; - site defined settings -
?"- 31-"+@time+"- @error @serror "? ; ---------------------------------------------------------------------------
?"- 32-"+@time+"- @error @serror "?
?"- 33-"+@time+"- @error @serror "? $debug_mode="yes" ; - no/yes - for additional information about checking registry keys -
?"- 34-"+@time+"- @error @serror "? ; - yes = temporary files will not be deleted -
?"- 35-"+@time+"- @error @serror "? $cpu_program="cpu.exe" ; - specifies path of cpu.exe program. -
?"- 36-"+@time+"- @error @serror "? ; - f.e. c:\winnt\cpu.exe or c:\windows\cpu.exe -
?"- 37-"+@time+"- @error @serror "?
?"- 38-"+@time+"- @error @serror "? ; ---------------------------------------------------------------------------
?"- 39-"+@time+"- @error @serror "? ; - -
?"- 40-"+@time+"- @error @serror "? ; ---------------------------------------------------------------------------
?"- 41-"+@time+"- @error @serror "?
?"- 42-"+@time+"- @error @serror "? $os_type=""
?"- 43-"+@time+"- @error @serror "? SELECT
?"- 44-"+@time+"- @error @serror "? CASE
($nt_mode = "yes") AND (@dos = "5.0") ; - Windows 2000 -
?"- 45-"+@time+"- @error @serror "? $os_type="W2K"
?"- 46-"+@time+"- @error @serror "? CASE
($nt_mode = "yes") ; - Windows NT -
?"- 47-"+@time+"- @error @serror "? $os_type="NT4"
?"- 48-"+@time+"- @error @serror "? CASE
($nt_mode <> "yes") AND (@dos = "4.90") ; - Windows ME -
?"- 49-"+@time+"- @error @serror "? $os_type="ME"
?"- 50-"+@time+"- @error @serror "? CASE
($nt_mode <> "yes") AND (@dos = "4.10") ; - Windows 98 -
?"- 51-"+@time+"- @error @serror "? $os_type="W98"
?"- 52-"+@time+"- @error @serror "? CASE
($nt_mode <> "yes") AND (@dos = "4.0") ; - Windows 95 -
?"- 53-"+@time+"- @error @serror "? $os_type="W95"
?"- 54-"+@time+"- @error @serror "? CASE
1
?"- 55-"+@time+"- @error @serror "? $os_type="???" ; - undetermined -
?"- 56-"+@time+"- @error @serror "? ENDSELECT
?"- 57-"+@time+"- @error @serror "?
?"- 58-"+@time+"- @error @serror "? ; - :script_cpu_processor
?"- 59-"+@time+"- @error @serror "?
?"- 60-"+@time+"- @error @serror "? $cpu="??? MHz"
?"- 61-"+@time+"- @error @serror "? $processor="???"
?"- 62-"+@time+"- @error @serror "? ;
?"- 63-"+@time+"- @error @serror "? MD "c:\temp"
?"- 64-"+@time+"- @error @serror "? IF (@error <> 0)
?"- 65-"+@time+"- @error @serror "? ENDIF
?"- 66-"+@time+"- @error @serror "? IF (exist($cpu_program) = 1)
?"- 67-"+@time+"- @error @serror "? ;CPU Type Identifier/C Version 2.07 Copyright(c) 1996-98 by B-coolWare.
?"- 68-"+@time+"- @error @serror "? ;Processor: Intel Pentium Pro (P6), 812MHz
?"- 69-"+@time+"- @error @serror "? ;Math unit: Internal
?"- 70-"+@time+"- @error @serror "? IF (Exist($cpu_file) = 1)
?"- 71-"+@time+"- @error @serror "? DEL $cpu_file
?"- 72-"+@time+"- @error @serror "? ENDIF
?"- 73-"+@time+"- @error @serror "? SHELL "%comspec% /c "+$cpu_program+" >"+$cpu_file
?"- 74-"+@time+"- @error @serror "? IF (Open(9,$cpu_file) = 0)
?"- 75-"+@time+"- @error @serror "? $result=ReadLine(9) ; - skip -
?"- 76-"+@time+"- @error @serror "? $result=ReadLine(9)
?"- 77-"+@time+"- @error @serror "? IF (Len($result) > 3)
?"- 78-"+@time+"- @error @serror "? $cpu=LTRIM(RTRIM(Substr($result,Instr($result,",")+1,Len($result)-Instr($result,","))))
?"- 79-"+@time+"- @error @serror "? $processor=LTRIM(RTRIM(Substr($result,Instr($result,":")+2,Len($result)-Instr($result,":")-2+1)))
?"- 80-"+@time+"- @error @serror "? ENDIF
?"- 81-"+@time+"- @error @serror "? IF (Close(9) <> 0)
?"- 82-"+@time+"- @error @serror "? ENDIF
?"- 83-"+@time+"- @error @serror "? ENDIF
?"- 84-"+@time+"- @error @serror "? IF (Exist($cpu_file) = 1)
?"- 85-"+@time+"- @error @serror "? IF ($debug_mode <> "yes")
?"- 86-"+@time+"- @error @serror "? DEL $cpu_file
?"- 87-"+@time+"- @error @serror "? ENDIF
?"- 88-"+@time+"- @error @serror "? ENDIF
?"- 89-"+@time+"- @error @serror "? ? "CPU: "+$cpu
?"- 90-"+@time+"- @error @serror "? ? " "+$processor
?"- 91-"+@time+"- @error @serror "? ELSE
?"- 92-"+@time+"- @error @serror "? ? "Abort CPU.KIX: missing program '"+LCASE($cpu_program)+"' for "+UCASE($os_type)+"."
?"- 93-"+@time+"- @error @serror "? EXIT
?"- 94-"+@time+"- @error @serror "? ENDIF
?"- 95-"+@time+"- @error @serror "? ;
?"- 96-"+@time+"- @error @serror "? ; result: $cpu
?"- 97-"+@time+"- @error @serror "? ; $processor

;($begin)
;
; thu 12-jul-2001 01:30:42 (kix 4.00 vs 2.27e)
;
;Informative KIXSTRIP: no errors found (input=97 output=97 skip=0).
;
;Summary KIXSTRIP: block structures
; - do:until [0:0]
; - for|each:in|to:step|next [0|0:0|0:0|0]
; - function:endfunction [0:0]
; - if:else:endif [11:2:11]
; - select:case:endselect [1:6:1]
; - while:loop [0:0]
;Informative KIXSTRIP: 12 block_structures found.
;Informative KIXSTRIP: no functions found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 1 EXIT
;Informative KIXSTRIP: 1 SHELL
;
;($end)

After running this script the result can be
code:
-2001/07/12 01:33:37- Script 3.63 starting.
- 1-01:33:37- 0 The operation completed successfully.

- 3-01:33:37- 0 The operation completed successfully.

- 4-01:33:37- 0 The operation completed successfully.

- 5-01:33:37- 0 The operation completed successfully.

- 6-01:33:37- 0 The operation completed successfully.

- 7-01:33:37- 0 The operation completed successfully.

- 8-01:33:37- 0 The operation completed successfully.

- 9-01:33:37- 0 The operation completed successfully.

- 10-01:33:37- 0 The operation completed successfully.

- 11-01:33:37- 0 The operation completed successfully.

- 12-01:33:37- 0 The operation completed successfully.

- 13-01:33:37- 0 The operation completed successfully.

- 14-01:33:37- 0 The operation completed successfully.

- 15-01:33:37- 0 The operation completed successfully.

- 16-01:33:37- 0 The operation completed successfully.

- 17-01:33:37- 0 The operation completed successfully.

- 18-01:33:37- 0 The operation completed successfully.

- 21-01:33:37- 0 The operation completed successfully.

- 22-01:33:37- 0 The operation completed successfully.

- 23-01:33:37- 0 The operation completed successfully.

- 26-01:33:37- 0 The operation completed successfully.

- 27-01:33:37- 0 The operation completed successfully.

- 28-01:33:37- 0 The operation completed successfully.

- 29-01:33:37- 0 The operation completed successfully.

- 30-01:33:37- 0 The operation completed successfully.

- 31-01:33:37- 0 The operation completed successfully.

- 32-01:33:37- 0 The operation completed successfully.

- 33-01:33:37- 0 The operation completed successfully.

- 34-01:33:37- 0 The operation completed successfully.

- 35-01:33:37- 0 The operation completed successfully.

- 36-01:33:37- 0 The operation completed successfully.

- 37-01:33:37- 0 The operation completed successfully.

- 38-01:33:37- 0 The operation completed successfully.

- 39-01:33:37- 0 The operation completed successfully.

- 40-01:33:37- 0 The operation completed successfully.

- 41-01:33:37- 0 The operation completed successfully.

- 42-01:33:37- 0 The operation completed successfully.

- 43-01:33:37- 0 The operation completed successfully.

- 53-01:33:37- 0 The operation completed successfully.

- 54-01:33:37- 0 The operation completed successfully.

- 57-01:33:37- 0 The operation completed successfully.

- 58-01:33:37- 0 The operation completed successfully.

- 59-01:33:37- 0 The operation completed successfully.

- 60-01:33:37- 0 The operation completed successfully.

- 61-01:33:37- 0 The operation completed successfully.

- 62-01:33:37- 0 The operation completed successfully.

- 63-01:33:37- 0 The operation completed successfully.

- 64-01:33:37- 183 Cannot create a file when that file already exists.

- 65-01:33:37- 183 Cannot create a file when that file already exists.

- 66-01:33:37- 183 Cannot create a file when that file already exists.

- 67-01:33:37- 0 The operation completed successfully.

- 68-01:33:37- 0 The operation completed successfully.

- 69-01:33:37- 0 The operation completed successfully.

- 70-01:33:37- 0 The operation completed successfully.

- 73-01:33:37- 0 The operation completed successfully.

- 74-01:33:37- 0 The operation completed successfully.

- 75-01:33:37- 0 The operation completed successfully.

- 76-01:33:37- 0 The operation completed successfully.

- 77-01:33:37- 0 The operation completed successfully.

- 78-01:33:37- 0 The operation completed successfully.

- 79-01:33:37- 0 The operation completed successfully.

- 80-01:33:37- 0 The operation completed successfully.

- 81-01:33:37- 0 The operation completed successfully.

- 83-01:33:37- 0 The operation completed successfully.

- 84-01:33:37- 0 The operation completed successfully.

- 85-01:33:37- 0 The operation completed successfully.

- 88-01:33:37- 0 The operation completed successfully.

- 89-01:33:37- 0 The operation completed successfully.

CPU: 1000MHz
- 90-01:33:37- 0 The operation completed successfully.

Intel Pentium III E, 1000MHz
- 91-01:33:37- 0 The operation completed successfully.

- 95-01:33:37- 0 The operation completed successfully.

- 96-01:33:37- 0 The operation completed successfully.

- 97-01:33:37- 0 The operation completed successfully.

Greetings.

[ 25. January 2003, 13:46: Message edited by: sealeopard ]
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA