Sign in to follow this  
Followers 0
bitreal

Pixel search problem related to resolution ?

3 posts in this topic

so i got this script to work in other computers but on my computer (using a tv screen) it doesn't work. 

Info about the code : 
it is supposed to search for the monster pixel and double click on it to attack and wait 15 seconds. after that it should do the pickupstuff func by pressing 2  five times.
if it doesn't find the pixel than it is supposed to turn 45 degrees and keep turning until it finds the monster.

The problem :
in other computers : i just install it , get the game in windowed 1024x768 and change the pixel search area and the colour and it should work just fine.

in my computer (note that i am using a tv screen as a monitor using HDMI 1920x1080p so its not a monitor) : when i do the same thing in other computers it doesn't work. for example it clicks outside the search area and does not click on the same color. so it must be a problem related to aspect ratio or my resolution or the fact its a tv ;( 
Code; 
 

HotKeySet("{esc}","myExit")

WinActivate("Window name")
WinMove("window name","",0,0)
while(1)

    ;hunt for pixels
    $cords = PixelSearch(939,578,50,166,0xBD7349,10)

    if not(@error) then
       MouseClick("left",$cords[0],$cords[1],2,1)
       sleep(15000)
       pickupStuff(5)
       sleep(1000)

    Else
       ;turn 45 degrees
       MouseMove(592,411)
       MouseDown("right")
       MouseMove(693,411)
       MouseUp("right")
    Endif
WEnd


Func myExit()
    Exit
EndFunc

func pickupStuff($count)
    for $x = 1 to $count
        send("2")
        Sleep(500)
    Next
EndFunc

i searched EVERYWHERE about this but no luck finding any info about it. so i just made an account

Share this post


Link to post
Share on other sites



also i am using windows 10 1920x1080p

Share this post


Link to post
Share on other sites

@bitreal you seem not to have read the forum rules on your way in. I suggest you do so now, particularly the bit about game automation, and you will see why this thread is locked. You will not receive any assistance on this topic.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0