Sign in to follow this  
Followers 0
clipse

Script required to close software popup

7 posts in this topic

Hi

Im new to autoit but it looks like the right community to ask the following question.

I play at titanpoker and they have an annoying cashgame/tournament popup ad that overlays tables and just generally anoy the hell out of me.

It either happens once a day or it pops up every couple of minutes then goes away for a hour or so and starts again.

Could anyone on this forum with the knowledge of autoit perhaps put together a simple script that would click the [ok] button on this window whenever it appears on-screen.

I would greatly appreciate any help in this matter.

Please let me know what other information is required to get something like this working.

Thanks

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

You'll need several things to get this going, I'll give you a few hints.

Look at the function called WinClose in the helpfile.

You'll need a loop to keep the script constantly looking for the popup window, here's the general idea:

While 1; This means it will loop until the user exits
If the window exists then close it; You'll use the WinExists and WinClose functions
Sleep(50); Check every 50 ms, if this omitted your CPU will do tons of work checking constantly
WEnd; This exits the loop
Edited by Achilles

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

hi there

I have had a look at a winclose script, particulary it was made to close the "new hardware detected" popup.

However I made adjustments but didnt get it it to actually close it, maybe because the particular window doesnt have a titlewindow (only thing constant is an OK button)

Share this post


Link to post
Share on other sites

ok I assume the script should be something like this:

While 1;

WinExists ("<title>" [, "<text>"]); WinKill ("<title>" [, "<text>"]) or I can use WinClose ("<title>" [, "<text>"])

Sleep(50);

WEnd;

My issue with the window, it has no title and in the main frame it has different advert text but at the bottom centre there is another frame/button with OK. Im not sure if the script example would actually read the OK in the button as text or if its read as an image?

Share this post


Link to post
Share on other sites

What browser are you using? Does it have popup blocking?

Is the popup created by the same web site where you are accessing your titanpoker from, or is it referencing some other website?

Have you checked your system for spyware and other 'unwanted' baggage?

What OS are you running?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

this is what you want

$A = 1
While $A < 3
    $B = 1
    While $B < 580
        Sleep(1000)
        If WinExists("WindowNameHere") Then
            WinClose("WindowNameHere")
        EndIf
    Wend
Wend

you can also use: WinSetState("WindowNameHere", "", @SW_HIDE)

instead of closing or killing it.

i hope it will help you.

Edited by zFrank

[font="Georgia"]GSM Expert[/font] but not AutoIt :DProud to be Admin Of : http://www.gsmhosting.net/visit my Forum... http://www.gsmhosting.net/vbb/index.php
$Life = "Happy"
If @Error Then
$Life = "Risk"

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