Melkor2 Posted February 2, 2008 Posted February 2, 2008 (edited) How exactly would I record and automatically average the time it takes my script to to go from the finish of function Find() to the finish of function CheckHealth() then also save to a INI file? I've read some intresting things in the documentation, but Im unsure where to start with this bit. I want to add this bit of into to my tooltip Also, is it possible to have two rows of info in one tooltip, other than having one real long annoying tooltip? Edited February 2, 2008 by Melkor2
Simucal Posted February 2, 2008 Posted February 2, 2008 How exactly would I record and automatically average the time it takes my script to to go from the finish of function Find() to the finish of function CheckHealth() then also save to a INI file? In the helpfile look for examples using TimerInit() and TimerDiff() I've read some intresting things in the documentation, but Im unsure where to start with this bit. I want to add this bit of into to my tooltip Also, is it possible to have two rows of info in one tooltip, other than having one real long annoying tooltip? ToolTip("This is"&@CR&"on two lines") Sleep(2000) AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Melkor2 Posted February 2, 2008 Author Posted February 2, 2008 So.... In my operation. While $i <= 1000 $i = $i + 1 ToolTip("Monsters Killed: " & $i & "Kill Time: " & $killtime &, 0, 0) $time1 = TimerInit() _Find() Send("3") _checkhealth() Send("2") Send("T") Send("T") $killtime = TimerDiff($time1) wend Now, How do I make this save that variable over many loops, and make $killtime an average not a per-run. Im also looking to convert it into minuets, but I assume I can do that with the division function.
Melkor2 Posted February 2, 2008 Author Posted February 2, 2008 (edited) Syntax error in my tooltip =S While $i <= 1000 $i = $i + 1 ToolTip("Monsters Killed: " & $i & @CR "Kill Time: " & $killtime2 &, 0, 0) $time1 = TimerInit() _Find() Send("3") _checkhealth() Send("2") Send("T") Send("T") $killtime = TimerDiff($time1) $killtime2 = ($killtime / 1000) Wend Bugger this bit of code is. Ahh, after some debugging it seems it either has a problem with how I'm dividing $killtime2, or the comma? Either way I'd appreciate a revision Wend Edited February 2, 2008 by Melkor2
Simucal Posted February 2, 2008 Posted February 2, 2008 #include <Date.au3> Global $iKillTimerDiff, $iHours, $iMins, $iSecs For $i = 1 To 1000 _TicksToTime($iKillTimerDiff, $iHours, $iMins, $iSecs) ToolTip("Monsters Killed: " & $i & @CR & "Kill Time: " & $iMins & "Min "&$iSecs&"Sec", 0, 0) $oKillTimer = TimerInit() _Find() Send("3") _checkhealth() Send("2") Send("T") Send("T") $iKillTimerDiff = TimerDiff($oKillTimer) Next Func _Find() ; Find code goes here EndFunc Func _CheckHealth() ; CheckHealth goes here EndFunc This is an example of something you could do. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Melkor2 Posted February 2, 2008 Author Posted February 2, 2008 Awesome man, thanks! Most of that was out of my ability level, thanks for the help! I see you understand about pixel search etc, may I PM you my script get your opinion on how to optimize it? It works as it is, just needs a bit of tweaking. It's quite hard to edit the coords and it's slow.
martin Posted February 2, 2008 Posted February 2, 2008 (edited) #include <Date.au3> Global $iKillTimerDiff, $iHours, $iMins, $iSecs For $i = 1 To 1000 _TicksToTime($iKillTimerDiff, $iHours, $iMins, $iSecs) ToolTip("Monsters Killed: " & $i & @CR & "Kill Time: " & $iMins & "Min "&$iSecs&"Sec", 0, 0) $oKillTimer = TimerInit() _Find() Send("3") _checkhealth() Send("2") Send("T") Send("T") $iKillTimerDiff = TimerDiff($oKillTimer) Next Func _Find() ; Find code goes here EndFunc Func _CheckHealth() ; CheckHealth goes here EndFunc This is an example of something you could do. The average seems to have been forgotten. Added with the average displayed instead of the last time. #include <Date.au3> Global $iKillTimerDiff, $iHours, $iMins, $iSecs, $iTotal = 0,$iAverage = 0 For $i = 1 To 1000 _TicksToTime($iAverage, $iHours, $iMins, $iSecs) ToolTip("Monsters Killed: " & $i & @CR & "Kill Time: " & $iMins & "Min "&$iSecs&"Sec", 0, 0) $oKillTimer = TimerInit() _Find() Send("3") _checkhealth() Send("2") Send("T") Send("T") $iKillTimerDiff = TimerDiff($oKillTimer) $iTotal += $iKillTimerDiff $iAverage = $iTotal/$i Next Func _Find() ; Find code goes here EndFunc Func _CheckHealth() ; CheckHealth goes here EndFunc Edited February 2, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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