0x90h Posted December 21, 2007 Share Posted December 21, 2007 (edited) expandcollapse popupinclude <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 December 22, 2007 by 0x90h Link to comment Share on other sites More sharing options...
DW1 Posted December 21, 2007 Share Posted December 21, 2007 (edited) GUICtrlSetData($control,'zxx sod'&@LF&'3 3'&@LF&'*&% !@#') $timer = TimerInit() Sleep(Random($iFreq-$iFreqSpread,$iFreq+$iFreqSpread,1)) _GetData() TimerDiff($timer) Edited December 21, 2007 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
0x90h Posted December 22, 2007 Author Share Posted December 22, 2007 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'. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now