Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get a macro to react to a color
#1
Hi..

Nice program, I'm tryin the trial at the moment to see if it can help me with some tasks. Here is my question.

Can I get the macro to start when a specific color becomes visible in a window.. For example.

I have black screen, and when it turns to red the macro should start. I hope it is possible.

Regards,

Faxe
#2
Create and run function that waits for specific color in specific point in screen, and then launches the macro. Example:

Code:
Copy      Help
int x y color
lpstr macro

;define coordinates, color and macro
x=100
y=15
color=ColorFromRGB(255 0 0) ;;red
macro="Macro7"

;wait for color
;g1

rep
,1
,if(pixel(x y)=color)
,,mac macro
,,break

;wait for different color
rep
,1
,if(pixel(x y)!=color) goto g1
#3
I could not get it to work Sad

But in the alpha release I should be able to use the wait for color function, I will try it out.


Forum Jump:


Users browsing this thread: 1 Guest(s)