Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetColorInCursorcrashes after ~9k calls
#1
Hi,

I'm trying to make a simple macro to assist me in a game. The goal is simple : When the top left pixel of the cursor turns black, play a sound (a beep)

For this, i'm using the "GetColorInCursor" function, shared in this post : 

https://www.quickmacros.com/forum/showth...use+cursor

But the problem is that, after ~9k calls to this function, it become unresponsive and returns nothing.

The speed of the macro does not change anything, if it's slow or fast it will still crash after 9k calls.

Can you help me ? Thanks

Macro Macro6
Code:
Copy      Help
int i count

spe 100

rep
,i=GetColorInCursor(0 0 1) ;;color at the hot spot (mouse position);; Get the pixel color at x=0 and y=0 of the mouse cursor
,out i
,if i=0;;if the top left pixel color is 0 (=black)
,,bee;;beep sound
,count+1;out count;;To check how much function calls i've made.
#2
GetCursorBitmap leaks memory. Now fixed. Replace GetCursorBitmap text with new text.
https://www.quickmacros.com/forum/showth...46#pid9846
#3
As always, it works ! Thanks Gintaras Wink


Forum Jump:


Users browsing this thread: 1 Guest(s)