Jump to content

Whats Wrong?


Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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.

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.

Link to comment
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.

Link to comment
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. "

Link to comment
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.

Link to comment
Share on other sites

  • 2 weeks later...

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.?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...