Jump to content
Sign in to follow this  
lucky21

Help with pixelsearch

Recommended Posts

lucky21

Hey! I  need some help with my script. I am new at that, as you'll realise... It's really simple..

I use pixelsearch to find for instance 2 colors and click on those. My problem is that: it has to finish with the one color in order to continue to next.. That doesn't work for me.. Is any way to make it find and click on the colors horizontaly? What do I mean? I attach a picture from the Painter to show how it works now.. As it is, it has to finish (paint black) with the red color, and then it starts with the yellow.. What I want, is to make it paint black both red and yellow horizontaly.. Is this possible? That's my script:

while 1   
$box1 = PixelSearch(44, 194, 220, 513, 0xED1C24, 10)
$box2 = PixelSearch(44, 194, 220, 513, 0xFFC90E, 10)

 If IsArray ($box1) = True Then
MouseMove ($box1 [0], $box1 [1],0)
MouseClick ("left")
 
ElseIf IsArray ($box2) = True Then
MouseMove ($box2 [0], $box2 [1],0)
MouseClick ("left")

 EndIf
WEnd

Χωρίς τίτλο.bmp

Edited by lucky21

Share this post


Link to post
Share on other sites
FireFox

Hi,

What is this script for ?

There may be more reliabe ways to automate what you're trying to achieve.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Bert

seeing how you are new and usually people who are now who ask about pixel search are using it for a game, you should read the forum rules. We do not allow for game automation discussions in the forum. Now If I'm mistaken (I really hope I am) then please forgive my transgression.

Share this post


Link to post
Share on other sites
lucky21

MBALZESHARI, thank you for the information. No, I do not want it for a game or anything like that. Its for my personal use only (hopefully, I'll use it in my job). Can you help me? 

Fire Fox, what do you mean "more reliable ways"? Do you mean FastFind?

Share this post


Link to post
Share on other sites
FireFox

I meant, is it based on images or controls? (obviously it's images)


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Bert

MBALZESHARI, thank you for the information. No, I do not want it for a game or anything like that. Its for my personal use only (hopefully, I'll use it in my job). Can you help me? 

 

Fire Fox, what do you mean "more reliable ways"? Do you mean FastFind?

I would be happy to help. We may be able to work directly with the app in question by hooking into it's controls. WHats the name of the app? Odds are someone has done what you need so we can get you all fixed up in no time! Edited by MBALZESHARI

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  

×