Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Restricting window scanning
#1
Good afternoon,
I'm using a script to fetch certain color within a window.
It's working, but I had to restrict the search within that window, using "RECT". But I realized that the search has not had the same success, sometimes, even if the color is within the search area, it ignores it.
Have I done something wrong?
 
Code:
Copy      Help
int w=win("My Program")
RECT r;
SetRect &r 319 204 1075 591 ;
int w1=wait(0 WA win("My Program"))





rep
    wait 0.1
    ifk(J 1)
        out "Scroll lock on."
        break
        shutdown -6
    if(scan("color:0x4A42B5" w r 1|16 4))
        key+ F3 ;; F3
        wait 0.1
        key- F3 ;; F3
        mou 747 400 win() 1
        key V           ;; Space
    else
        key V           ;; Space
        wait 0.3
#2
scan modifies the RECT variable. Move the SetRect line to before the scan line.
#3
Tks. It's work


Forum Jump:


Users browsing this thread: 1 Guest(s)