Novastar:

Don't get me wrong - I agree with you mostly !

I don't want the GUI goodies either. When I'm developing an end-user application, KiXtart is my last choice.

I wish VB was my last choice too - but it's just so damn nice to develop with VB. But those friggin runtimes ! Arrrgh !!!

What I am after is the Windows NT internal stuff (the API's) that would be so nice to get at from within KiX. Imagine if one could roll all those ResKit and DOS commands into a single KiX library DLL ! A common interface and a common way of returning values to one's script !

No more would we have to shell-out to a program, pipe the output to file - then read (parse) it back in. What a Kludge !

Here's the driver for the current incarnation of the library ...

code:

break on

;--------------------------------------------------------
; Create the kixtart.library object ...
;--------------------------------------------------------


$lib = olecreateobject ( "kixtart.library" )


if $lib = 0
?"Error creating kixtart.library"
exit
endif


;--------------------------------------------------------
; Get the current millisecond counter from Windows NT ...
;--------------------------------------------------------


$start = val(olecallfunc ( $lib, "GetTickCount" ))


;--------------------------------------------------------
; Set the console window title to something else ...
;--------------------------------------------------------


olecallfunc ( $lib, "SetConsoleTitle", "s", "Kixtart.Library Driver Script" )


;--------------------------------------------------------
; Check if console cursor is currently visible ...
;--------------------------------------------------------


if olecallfunc ( $lib, "GetCursorVisible" )


;--------------------------------------------------------
; Make console cursor invisible ...
;--------------------------------------------------------


olecallfunc ( $lib, "SetCursorVisible", "i", "0" )


? ?"Enter an invisible cursor string > " gets $c


;--------------------------------------------------------
; Set console cursor back to visible ...
;--------------------------------------------------------


olecallfunc ( $lib, "SetCursorVisible", "i", "1" )


endif


;--------------------------------------------------------
; Get the current millisecond counter from Windows NT ...
;--------------------------------------------------------


$end = val(olecallfunc ( $lib, "GetTickCount" ))


;--------------------------------------------------------
; Display elapsed milliseconds (runtime) for script ...
;--------------------------------------------------------


? ?"Elapsed milliseconds = " $end - $start


;--------------------------------------------------------
; Release the kixtart.library object
;--------------------------------------------------------


$rs = olereleaseobject ( $lib )


exit



I use this tool just for the GetTickCount function when benchmarking my scripts to see how long certain kix commands (ingroup) and programs (shells) take to execute !

Anyway - I don't know if this kind of library has any general use within the KiX community or not ! Might make an interesting debugging tool though !

Shawn.

[This message has been edited by Shawn (edited 30 May 2000).]