BALA Posted January 14, 2007 Share Posted January 14, 2007 How can you detect a pop-up window in AutoIt? [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Psibernetic Posted January 14, 2007 Share Posted January 14, 2007 How can you detect a pop-up window in AutoIt?would winactive("title") work for you? [sup]Psibernetic[/sup]My Creations:X-HideSecuracy Link to comment Share on other sites More sharing options...
BALA Posted January 14, 2007 Author Share Posted January 14, 2007 Well I'm looking fro a way to detect a random window that pops up. So I wouldn't know the title. [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Bert Posted January 15, 2007 Share Posted January 15, 2007 can you be a little more specific? what type of random window? in a game, what? The Vollatran project  My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
BALA Posted January 15, 2007 Author Share Posted January 15, 2007 By random, I mean random. Any window that pops up on your screen. [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
BALA Posted January 15, 2007 Author Share Posted January 15, 2007 (edited) How about an internet pop-up Edited January 15, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Psibernetic Posted January 15, 2007 Share Posted January 15, 2007 By random, I mean random.Any window that pops up on your screen.then:CODEIf WinActive("ur program's title")<>"true" then;w/e u need to doendif [sup]Psibernetic[/sup]My Creations:X-HideSecuracy Link to comment Share on other sites More sharing options...
BALA Posted January 15, 2007 Author Share Posted January 15, 2007 then:CODEIf WinActive("ur program's title")<>"true" then;w/e u need to doendifDon't know how you got that quote (my computer is lagging intensely at the moment) but your code requires me to know the title, I don't know the title is the problem. Really i I need a command that will tell me the title of a window that pops up. [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Psibernetic Posted January 15, 2007 Share Posted January 15, 2007 Don't know how you got that quote (my computer is lagging intensely at the moment) but your code requires me to know the title, I don't know the title is the problem. Really i I need a command that will tell me the title of a window that pops up.so ur script is going to be a background process?... [sup]Psibernetic[/sup]My Creations:X-HideSecuracy Link to comment Share on other sites More sharing options...
BALA Posted January 15, 2007 Author Share Posted January 15, 2007 I suppose so, don't really see how that's relevant... [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Psibernetic Posted January 15, 2007 Share Posted January 15, 2007 because then u could set the WinActive to monitor whichever app u need to keep pop ups away from with the code I gave u... if $Whatever_u_need_active isn't active then (w/e u need it to do) [sup]Psibernetic[/sup]My Creations:X-HideSecuracy Link to comment Share on other sites More sharing options...
BALA Posted January 15, 2007 Author Share Posted January 15, 2007 because then u could set the WinActive to monitor whichever app u need to keep pop ups away from with the code I gave u... if $Whatever_u_need_active isn't active then (w/e u need it to do)Ah, I see now. Sorry, didn't understand what "w/e" meant. Thanks [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Psibernetic Posted January 15, 2007 Share Posted January 15, 2007 Ah, I see now. Sorry, didn't understand what "w/e" meant. Thanks o wow ya sorry...my fault...damn aim has ruined my vocabulary [sup]Psibernetic[/sup]My Creations:X-HideSecuracy Link to comment Share on other sites More sharing options...
BALA Posted January 15, 2007 Author Share Posted January 15, 2007 Lol-!- I mean Hahaha Yeah, I once got stuck saying 'wtf' for 3 months straight, anyways thanks for the help, it really was a lifesaver. [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 15, 2007 Moderators Share Posted January 15, 2007 (edited) Might see where this takes you :Global $aAllVisWin = '' AdlibEnable('_GetPopUp', 100) While 1 Sleep(10000) WEnd Func _GetPopUp() AdlibDisable() If Not $aAllVisWin Then Local $aWL = WinList() For $iCC = 1 To UBound($aWL) - 1 If $aWL[$iCC][0] <> '' And _ BitAND(WinGetState($aWL[$iCC][0]), 2) Then _ $aAllVisWin &= $aWL[$iCC][0] & Chr(1) Next Else Local $sTitle = WinGetTitle('') If $sTitle <> '' And _ Not StringInStr(Chr(1) & $aAllVisWin, Chr(1) & $sTitle & Chr(1)) Then MsgBox(64, 'Info', 'Extra Window:' & @CRLF & $sTitle) EndIf EndIf AdlibEnable('_GetPopUp', 100) Return '' EndFunc Edited January 15, 2007 by SmOke_N 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 More sharing options...
BALA Posted January 15, 2007 Author Share Posted January 15, 2007 Might see where this takes you :Global $aAllVisWin = '' AdlibEnable('_GetPopUp', 100) While 1 Sleep(10000) WEnd Func _GetPopUp() AdlibDisable() If Not $aAllVisWin Then Local $aWL = WinList() For $iCC = 1 To UBound($aWL) - 1 If $aWL[$iCC][0] <> '' And _ BitAND(WinGetState($aWL[$iCC][0]), 2) Then _ $aAllVisWin &= $aWL[$iCC][0] & Chr(1) Next Else Local $sTitle = WinGetTitle('') If $sTitle <> '' And _ Not StringInStr(Chr(1) & $aAllVisWin, Chr(1) & $sTitle & Chr(1)) Then MsgBox(64, 'Info', 'Extra Window:' & @CRLF & $sTitle) EndIf EndIf AdlibEnable('_GetPopUp', 100) Return '' EndFuncAwesome, thanks too. [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 15, 2007 Moderators Share Posted January 15, 2007 (edited) Awesome, thanks too.This could get quite annoying... Anyway, you might think about giving an option to kill it / Add it etc... Global $aAllVisWin = '', $sWins2Kill AdlibEnable('_GetPopUp', 10) While 1 Sleep(10000) WEnd Func _GetPopUp() AdlibDisable() If Not $aAllVisWin Then Local $aWL = WinList() For $iCC = 1 To UBound($aWL) - 1 If $aWL[$iCC][0] <> '' And _ BitAND(WinGetState($aWL[$iCC][0]), 2) Then _ $aAllVisWin &= $aWL[$iCC][0] & Chr(1) Next Else Local $sTitle = WinGetTitle('') If $sTitle <> '' And _ Not StringInStr(Chr(1) & $aAllVisWin, Chr(1) & $sTitle & Chr(1)) Then If StringInStr(Chr(1) & $sWins2Kill, Chr(1) & $sTitle & Chr(1)) Then WinKill($sTitle) ElseIf MsgBox(262144 + 68, 'New Window Detected!', 'Window not recognized:' & @CRLF & @CRLF & _ 'Window Name: --> "' & $sTitle & '"' & @CRLF & @CRLF & _ 'Would you like to kill it?') = 6 Then $sWins2Kill &= $sTitle & Chr(1) WinKill($sTitle) Else $aAllVisWin &= $sTitle & Chr(1) EndIf EndIf EndIf AdlibEnable('_GetPopUp', 10) Return '' EndFunc Edit: Revised it a bit more (didn't make it an option, you can do that). Now if you kill the window, it's added to the do not allow list, so you won't keep getting the message box. Edited January 15, 2007 by SmOke_N 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 More sharing options...
daslick Posted January 15, 2007 Share Posted January 15, 2007 I built a popup blocker into my browser by using adlibenable on a function that just killed iexplore.... but of course if that kills ALL it's windows... so it may not work in your case. Link to comment Share on other sites More sharing options...
BALA Posted January 15, 2007 Author Share Posted January 15, 2007 Thanks for the help, but I really would rather script it myself, [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
acidfear Posted January 16, 2007 Share Posted January 16, 2007 Is it possible to block out ip's with autoit? For instance, you make a file with all the ad links/converted to IP's and just have it so that if that IP connects, it won't let it or close it immediately. 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