clipse Posted July 29, 2008 Share Posted July 29, 2008 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 Link to comment Share on other sites More sharing options...
Developers Jos Posted July 29, 2008 Developers Share Posted July 29, 2008 welcome. What about you trying it first yourself and ask support when you get stuck? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Achilles Posted July 29, 2008 Share Posted July 29, 2008 (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 July 29, 2008 by Achilles My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
clipse Posted July 29, 2008 Author Share Posted July 29, 2008 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) Link to comment Share on other sites More sharing options...
clipse Posted July 29, 2008 Author Share Posted July 29, 2008 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? Link to comment Share on other sites More sharing options...
Confuzzled Posted August 1, 2008 Share Posted August 1, 2008 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? Link to comment Share on other sites More sharing options...
zFrank Posted August 1, 2008 Share Posted August 1, 2008 (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 August 1, 2008 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" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now