Sign in to follow this  
Followers 0
evilelf

Whats Wrong?

10 posts in this topic

Please Look over this Little Scrip.

Im trying to Find a Pop up thats not always there but when it is, it will then Search for the White to Click No.

( Some Times Its going to be Minimized/BackGround,Thats why its a SafeCheck. )

I test my Things with HotKeys...

; Script Start - Add your code below here
Global $SafeCheck
Global $Form
$help = 1
HotKeySet("{End}","_Hello")

While $help = 1
    ToolTip("Waitting")
    Sleep(90)
WEnd

Func _Hello()
    $help = 2
$SafeCheck = WinGetHandle("MyGame")
If Not @error Then
    PixelSearch(278,260,350,274,0xF4F4F4,3); Should Be White or Light Gray.
    EndIf
If Not @error Then
    ControlClick ( "MyGame", "", "", "left", 1,297,268)
    Exit 0
EndIf
EndFunc

Share this post


Link to post
Share on other sites



whats the problem??

Share this post


Link to post
Share on other sites

Its not working...

im about 50% that this should even work,.

Thought some one else would know why its not doing what i want it to do.


Share this post


Link to post
Share on other sites

Its not working...

im about 50% that this should even work,.

Thought some one else would know why its not doing what i want it to do.

You can't search minimized windows with pixel functions period.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

So i Must Memory Search?..

If so,

What is the best road to take...

Edited by evilelf

Share this post


Link to post
Share on other sites

You could possibly look for the window, then set it on top to search pixels. There is a whole set of window functions.

For a more method using Internet Explorer, check out the set of functions developed for these tasks.

Or better yet, get a pop up blocker? I'm not sure I quite understand the problem but remember the helpfile is your friend.

Share this post


Link to post
Share on other sites

I need to Look for a Color, Pixel In a Not Active window...

Smoke said you cant..

Now i dont know if that counts as for i cant some how control PixelSearch in that window...

But He did Say "You can't search minimized windows with pixel functions period. "


Share this post


Link to post
Share on other sites

So why don't you activate the window, set it to the top, and then search, or do you mean it is a hidden window?

Share this post


Link to post
Share on other sites

Well Some Times its Hidden, so i thought maybe i could some how

focus it but still grayed out/Not Active, and pixelSearch for the White Pixel, if Found it would Click.

Some Times The Box will Pop up behind the program with The White Pixel in it.


Share this post


Link to post
Share on other sites

Well Some Times its Hidden, so i thought maybe i could some how

focus it but still grayed out/Not Active, and pixelSearch for the White Pixel, if Found it would Click.

Some Times The Box will Pop up behind the program with The White Pixel in it.

Did you try

If WinExists("popuptitle"),

WinActivate($popuptitle, ""),

WinSetOnTop,

etc.?

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  
Followers 0