Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
task for pixel color
#1
If a specific color appear on a screan scrip should keep pressing button untill it dissapear
and when the color is not on the screa scrip should keep pressing diffrent key every 5 sec.

Code:
Copy      Help
;beginning

int wait=wait 0 -S "color:0x6BCBFF"


if wait
,key V
,1
,key Ss
,goto beginning
else
,key T

i dont know why its not working
and how to make repeat pressing key v and Ss till color disapears??
#2
Macro Macro1061
Code:
Copy      Help
str color="color:0x6BCBFF"
rep
,if(scan(color))
,,out "yes"
,,1 ;;don't make this too small, or this macro will eat too much CPU. Look in Task Manager.
,else
,,out "no"
,,wait 5 S color; err
#3
Thanks very much works fineBig Grin
#4
ok sorry 1 last question.
Is there a posibility that if scan turns out no like 10-20 times script would execute another task??
#5
Macro Macro1497
Code:
Copy      Help
str color="color:0x6BCBFF"
int i
rep
,if(scan(color))
,,out "yes"
,,i=0
,,1 ;;don't make this too small, or this macro will eat too much CPU. Look in Task Manager.
,else
,,out "no"
,,i+1; if(i=10) break
,,wait 5 S color; err

mes "other task"


Forum Jump:


Users browsing this thread: 1 Guest(s)