Sign in to follow this  
Followers 0
0x90h

TimeInit() and TimeDiff()

3 posts in this topic

#1 ·  Posted (edited)

include <GUIConstants.au3>

$hWnd = GUICreate("Lure", 200, 70, 100, 84)
$Data = GUICtrlCreateLabel("data", 24, 8, 212, 113)
GUISetState(@SW_SHOW)

While 1
    _AnimateData(3000,2702,$Data)
Wend


; this function animate the data for me
; i wanted to make it a bit random/unpreadictable
;
Func _AnimateData($iFreq,$iFreqSpread,$control)
GUICtrlSetData($control,'weq dsa'&@LF&'1 3'&@LF&'.,; )()')
Sleep(Random($iFreq-$iFreqSpread,$iFreq+$iFreqSpread,1))
    _GetData()
    
GUICtrlSetData($control,'qwe tre'&@LF&'2 3'&@LF&'#$% %^&')
Sleep(Random($iFreq-$iFreqSpread,$iFreq+$iFreqSpread,1))
    _GetData()
    
GUICtrlSetData($control,'zxx sod'&@LF&'3 3'&@LF&'*&% !@#')
Sleep(Random($iFreq-$iFreqSpread,$iFreq+$iFreqSpread,1))
    _GetData()
    
EndFunc


; this one pretend to be function intercepting data
; from the extended control
; (some other process which runs at the pc)
; 
Func _GetData()
$avResult = StringSplit(GUICtrlRead($Data),@LF)
ConsoleWrite('- avResult[2]: '&$avResult[2]&@CRLF)
Return $avResult[2]
EndFuncƒoÝŠ÷ ÚW­±«,ºg­…êÞŠÉèÁ¬­¡ÚºÚ"µÍ‰ˆÌÍŽÝ[YQY™ˆH˜[™ÛJ    ˆÌÍŽÚQœ™KIˆÌÍŽÚQœ™TÜ™XY  ˆÌÍŽÚQœ™JɈÌÍŽÚQœ™TÜ™XYJ

now, how to measure time difference between points where data at the $avResult[2] change?

you may not believe me but i am strugling this since like two hours... this is no joke lol.

Edited by 0x90h

Share this post


Link to post
Share on other sites



thanks for reply but this is not what i ment to do, my bad.

my aim is to make stand-alone function to measure how much time it takes for data to change at $avResult[2].

lets say i can do nothing about _AnimateData() function, there is no way to me to change the code.

im interested only on how much time last $avResult[2]='1 3' / $avResult[2]='2 3' / $avResult[2]='3 3'.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0