Jump to content
Sign in to follow this  
Wurschtbrot

script takes 10 ms in winxp

Recommended Posts

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 by Wurschtbrot

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  

×
×
  • Create New...