AutoHotkey Community

It is currently May 27th, 2012, 1:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: August 27th, 2008, 5:20 am 
Hey I'm writing a script and speed could be very important I'm not sure yet. I'm wondering how slow is the PixelGetColor function, would 20 pixelGetColor calls in a row take > 1 second on standard hardware?

I know the question is quite ambiguous since it depends on machine to machine, just looking for guidelines


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2008, 5:48 am 
Offline

Joined: May 28th, 2008, 2:11 am
Posts: 739
Location: Minnesota, USA
Why not try it for yourself?
Code:
Start := A_TickCount
Loop, 20
   PixelGetColor, var, 1, 1
MsgBox % "20 PixelGetColor calls took " (A_TickCount - Start) "ms"
(oh, and the answer is no. It took my crappy old computer 350-400ms for 2000 pixelgetcolor calls)

_________________
Unless otherwise stated, all code is untested

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2008, 6:00 am 
i got "20000 PixelGetColor calls took 375ms"

375/20000 = 0.018750ms / pixel

it's not slow :P


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, oldbrother, Yahoo [Bot] and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group