bobheart Posted May 25, 2004 Share Posted May 25, 2004 How would you make a popup stopper ? Or can it be done ? Link to comment Share on other sites More sharing options...
scriptkitty Posted May 25, 2004 Share Posted May 25, 2004 (edited) might be easier to use a free one, but basically you can set autoit to loop and look for any window criteria you specify, and close those, but I would suggest Firefox. http://www.mozilla.org/products/firefox/Free browser that has a lot of nice features, (one being popup stoper.) Some others would suggest Opera.while 1 if winexists("Buy crap from me","") then winclose("Buy crap from me","") if winexists("Buy now","") then winclose("Buy now","") sleep(1) wend...edit hmm, interesting approach Larry, I might try that. Edited May 25, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
bobheart Posted May 25, 2004 Author Share Posted May 25, 2004 I use firefox , this is for the nieces computer I just built for them and it has IE on it . I just want it to kill any Internet Explore window that opens after the first one is open and if they need more to open thet can just click on it to pause it . Link to comment Share on other sites More sharing options...
emmanuel Posted May 25, 2004 Share Posted May 25, 2004 I use firefox , this is for the nieces computer I just built for them and it has IE on it . I just want it to kill any Internet Explore window that opens after the first one is open and if they need more to open thet can just click on it to pause it .I'd suggest the google toolbar in that case, simple and works well (as well as a handy way to google) "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
emmanuel Posted May 25, 2004 Share Posted May 25, 2004 I am using "google toolbar" + "spy-bot search and destroy", then occasional Adaware.Lar.thank god for those tools, sometimes, when the spyware gets in deep, you need "hijack this" as well... spent four hours yesterday with a PC that was dying of the crap... "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
bobheart Posted May 25, 2004 Author Share Posted May 25, 2004 can't do are own then ? Link to comment Share on other sites More sharing options...
scriptkitty Posted May 25, 2004 Share Posted May 25, 2004 Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") sleep(2000) Opt("WinTitleMatchMode",2) $hWnd =WinGetHandle("Microsoft Internet Explorer") Opt("WinTitleMatchMode",4) While 1 Opt("WinTitleMatchMode",2) $x = WinGetHandle("Microsoft Internet Explorer") Opt("WinTitleMatchMode",4) If $x<>$hWnd Then winclose("handle="&$x) sleep(10) If NOT winexists("handle="&$hWnd) Then exit Wend Popup stopper from Larry code. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
bobheart Posted May 25, 2004 Author Share Posted May 25, 2004 Wow that works good .. thank you .. Link to comment Share on other sites More sharing options...
scriptkitty Posted May 25, 2004 Share Posted May 25, 2004 (edited) every time you click on a page, it has the chance to update the full title Larry, so if it was at the wrong milisecond, you might close it. While WinExists($hWnd)   WinSetTitle($hWnd,"",StringReplace(WinGetTitle($hWnd),"plorer","pl0rer"))   Opt("WinTitleMatchMode",2); lets just say right now the web page updated title   If WinExists("Microsoft Internet Explorer") Then    WinClose("Microsoft Internet Explorer")   EndIftry WinSetTitle("Microsoft Internet Explorer","","bob") and click on a page, you will notice the full titlebar is back. My version of your code works, but the popup would have to get focus, it wouldn't work well with backround ones. Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") sleep(2000) Opt("WinTitleMatchMode",2) $hWnd =WinGetHandle("Microsoft Internet Explorer") Opt("WinTitleMatchMode",4) While 1 Opt("WinTitleMatchMode",2) $x = WinGetHandle("Microsoft Internet Explorer") Opt("WinTitleMatchMode",4) If $x<>$hWnd Then winclose("handle="&$x) sleep(10) If NOT winexists("handle="&$hWnd) Then exitloop Wend while winexists("Microsoft Internet Explorer"); close backround ones. winclose("Microsoft Internet Explorer") wend Edited May 25, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
bobheart Posted May 25, 2004 Author Share Posted May 25, 2004 That one larry does not work to good . it opens it and when you click on the back button it closes the window ? ( i was at a porn site to test popups , really I was . lol ) Link to comment Share on other sites More sharing options...
scriptkitty Posted May 25, 2004 Share Posted May 25, 2004 (edited) Sheesh, why do you hate my code so much? Code explained. Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") sleep(2000) Opt("WinTitleMatchMode",2) $hWnd =WinGetHandle("Microsoft Internet Explorer"); get good handle While 1; loop Opt("WinTitleMatchMode",2) $x = WinGetHandle("Microsoft Internet Explorer"); check for other handle Opt("WinTitleMatchMode",4) If $x<>$hWnd Then winclose("handle="&$x); close if not my handle sleep(10) If NOT winexists("handle="&$hWnd) Then exitloop; stop if original is gone Wend while winexists("Microsoft Internet Explorer"); close backround ones. winclose("Microsoft Internet Explorer") wend ..edit my question would be, can you use both WinExists("Microsoft Internet Explorer") And _ "handle=" & WinGetHandle("Microsoft Internet Explorer") <> $hWnd under Opt("WinTitleMatchMode",4)?? Edited May 25, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
bobheart Posted May 25, 2004 Author Share Posted May 25, 2004 Sheesh, why do you hate my code so much? Code explained. Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") sleep(2000) Opt("WinTitleMatchMode",2) $hWnd =WinGetHandle("Microsoft Internet Explorer"); get good handle While 1; loop Opt("WinTitleMatchMode",2) $x = WinGetHandle("Microsoft Internet Explorer"); check for other handle Opt("WinTitleMatchMode",4) If $x<>$hWnd Then winclose("handle="&$x); close if not my handle sleep(10) If NOT winexists("handle="&$hWnd) Then exitloop; stop if original is gone Wend while winexists("Microsoft Internet Explorer"); close backround ones. winclose("Microsoft Internet Explorer") wendI like it and it worked great .. Link to comment Share on other sites More sharing options...
scriptkitty Posted May 25, 2004 Share Posted May 25, 2004 Just teasing Larry. His code is always top notch, not often I can find any bug in it. I better mark it down in my calendar AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
bobheart Posted May 25, 2004 Author Share Posted May 25, 2004 Did you try yours ? it looks like it blocks ad's ? try it and see if it does on yours . Link to comment Share on other sites More sharing options...
scriptkitty Posted May 25, 2004 Share Posted May 25, 2004 I tested mine, it works OK. Adds and spyware do many more evil things than pop up windows though, so I still suggest some other program, like say google or such. This is more of an example of showing cool things you can do with AutoIt than a perfect solution. Webpages can add tracking cookies, lock up your mouse, change your homepage, and many other more sinister things. It is nice to know you can build a fire on your own, but after that, I grab a lighter or matches. AutoIt3, the MACGYVER Pocket Knife for computers. 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