Jump to content
Sign in to follow this  
kjcdude

PixelSearch Flash

Recommended Posts

kjcdude

I need to be able to pixel search a flash program so that i can click on the area that it finds.

The problem is that pixelsearch can't see flash colors. I even used the Flexy gui to test if it saw any colors, and it only sees white when the mouse is over any part of the flash object.

Thanks,

Kyle

Edited by kjcdude

Share this post


Link to post
Share on other sites
kjcdude

So i found a work around

Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
send("{printscreen}")
run("C:\WINDOWS\system32\mspaint.exe","", @SW_MAXIMIZE)
winwait("untitled - Paint")
if not WinActivate("untitled - Paint") then WinActivate("untitled - Paint")
send("{ctrldown}v{ctrlup}")
$coord = PixelSearch( 441, 422, 963, 899, 0x359AA4, 5 )
WinClose("untitled - Paint")
sleep(300)
send("{right}{enter}")
sleep(300)
MouseClick("left", "-60" & $coord[0], "-55" & $coord[1])

Now i'm just running into a problem with the subtraction of the cordinates at the bottom of the script, it keeps giving me the following error

Subscript used with non-array variable

Share this post


Link to post
Share on other sites
kjcdude

Got it working

Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",1)
send("{printscreen}")
run("C:\WINDOWS\system32\mspaint.exe","", @SW_MAXIMIZE)
winwait("untitled - Paint")
if not WinActivate("untitled - Paint") then WinActivate("untitled - Paint")
send("{ctrldown}v{ctrlup}")
sleep(300)
$coord = PixelSearch( 441, 422, 963, 899, 0x359AA4, 5 )
WinClose("untitled - Paint")
sleep(300)
send("{right}{enter}")
sleep(300)
MouseClick( "left", $coord[0] -60, $coord[1] -40, 2 )

Share this post


Link to post
Share on other sites
Neighthan

Thanks for the code! I am currently trying to work on a way to check my bag weight in Dofus and then, if it is full, run the script to take my goods back to the bank. I ran into similar issues with flash and pixelsearch, so this was very helpful!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×