Shawn,

sometimes I wonder how it comes that there are similar thoughts at the same time ... the following was planned to be posted as an addition to my request for a msec delay/sleep/wait command on monday

I referred to your sample 'spinner' in kixlib32.dll sample code to 'force' Ruud to implement that thing intrinsic, as a udf delay() will grab all processor time it can get !!!

code:

;FUNCTION delay()
;
;AUTHOR Jochen Polster (jochen.polster@gmx.net)
;
;ACTION halts script execution for specified amount of milliseconds
;
;SYNTAX Delay(milliseconds)
;
;PARAMETERS milliseconds (Required)
; - integer amount of milliseconds
;
;REMARKS if passed parameter is divisible by 1000,
; better use sleep instead ...
; Found no way yet to prevent the function being leaky
; regarding CPU time !
;
;RETURNS Nothing
;
;DEPENDENCIES None
;
;EXAMPLES call "path\Delay.udf"
break on
$ = setoption("HideCursor","on")
at(5,10) "Spinner"
at(7,10) "'S' - slow"
at(8,10) "'M' - medium"
at(9,10) "'F' - fast"
at(10,10)"'Q' - quit"
$wait = 100
while $k <> "q"
$c = $c + 1
select case $c = 1 at(5,19)'\'
case $c = 2 at(5,19)'|'
case $c = 3 at(5,19)'/'
case 1 at(5,19)'-' $c = 0
endselect
if kbhit()
get $k
select case $k = 's' $wait = 180
case $k = 'm' $wait = 100
case $k = 'f' $wait = 50
endselect
endif
delay($wait)
loop
;
;SOURCE

function delay($ms)
if vartype($ms) = 3
dim $t
$t = @ticks + $ms
do
;whatever to prevent grabbing 99% of proc time !!!
until $t <= @ticks
endif
endfunction


If anybody, I bet you are the one able to tell if there is any way around this problematic (at least you have the delay implemented non-leaky in your dll's ..)
I deny posting this on the library side unless there's a solution for it ... I mean that is not what one would expect if one tries to send his script to sleep

J.

_________________________