Wurschtbrot Posted March 19, 2008 Share Posted March 19, 2008 (edited) this scans like 100 pixel in xp it took on a 3000+ amd like notime at all in vista on a 2400 quad core cpu it takes a whole lot of time i noticed that with some other features too like pixel search Func hp() Local $ahp1 = 1 Local $ahpMin = $coord_min_hp_x Local $ahpMax = $coord_max_hp_x Local $ahpy = $coord_hp_y Local $ampx = 1 For $ampx = $ahpMin To $ahpMax Step 1 $ahp1 = PixelGetColor($ampx, $ahpy) If $ahp1 = Dec("090909") Then ExitLoop Next GUICtrlSetData($hp, Int((100 * ($ampx - $ahpMin) / ($ahpMax - $ahpMin))) & "%") If $ampx >= $ahpMax Then Return 1 If $ampx <> $ahpMax Then Return ($ampx - $ahpMin) / ($ahpMax - $ahpMin) EndFunc ;==>hp Edited March 19, 2008 by Wurschtbrot Link to comment Share on other sites More sharing options...
LarryDalooza Posted March 19, 2008 Share Posted March 19, 2008 PixelGetColor calls API that rely on GetDC ... GetDC takes much longer to run on Vista... it has been covered... try different search terms in the forum and try prefixing search words with + Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Wurschtbrot Posted March 19, 2008 Author Share Posted March 19, 2008 win win xp support mode with aero off it works totally nice !! TY can be closed Link to comment Share on other sites More sharing options...
Zedna Posted March 19, 2008 Share Posted March 19, 2008 for little optimization: you can do Dec("090909") outside of loop and use variable only inside loop Resources UDF ResourcesEx UDF AutoIt Forum Search 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