Jump to content
Sign in to follow this  
B3TA_SCR1PT3R

my pop up blocker

Recommended Posts

B3TA_SCR1PT3R

well here it is my pop up blocker.needs latest beta

this one may still have a lot of bugs but i saved about 10 different versions all over my HD (for testing new things) and this is the most up to date one i found so yeah..

yeah i know thers about 23492387498 pop up blockers made with autoit but mynes the best WHY? BECAUSE I SAY SO!!! DONT QUESTION MY AWESOMENESS!

#include <GuiConstants.au3>
#include <File.au3>
#include <Process.au3>
GLOBAL $xx, $zx , $xr;variable can be used anywhere in script!
GLOBAL $t_1, $t_2, $t_3, $t_4, $t_5
GLOBAL $Allow_Web, $667, $666
GLOBAL $filepath = 'C:\Pop-Up Blocker\'
$Allow_Web = '0';Pop-Up Blocker is Enabled By Default....Duhh!
;Tray Menu Stuff
Opt("WinTitleMatchMode", 2);Use 4 If classname = becomes in play /else do : IF Else then 4 in while 1
Opt("TrayAutoPause",0);cant pause script
TraySetToolTip("Pop-Up Blocker Active")

If Not FileExists($filepath) Then DirCreate($filepath)

If Not FileExists($filepath & "System.ini") Then 
    Start();all filenames subject 2 change
Else
    Inter()
EndIf

Func Start()
;First MessageBox
    $gak = MsgBox(4096 + 36,"Setup","Start When Windows Starts?");adds a registry entry and places shortcut in startup folder
    Sleep(100)
    If $gak = 6 Then
        IniWrite($filepath & "System.ini","Settings","Start","True")
    Else
        IniWrite($filepath & "System.ini","Settings","Start","False")
    EndIf
;Second MessageBox
    $gup = MsgBox(4096 + 36,"Setup","Run in Stealth Mode?");no trayicon 
    Sleep(100)
    If $gup = 6 Then
        IniWrite($filepath & "System.ini","Settings","Run","True")
    Else
        IniWrite($filepath & "System.ini","Settings","Run","False")
    EndIf
;Third MessageBox
    $gif = MsgBox(4096 + 36,"Setup","Notify When a Pop-Up is Blocked?");makes traytip in While 1
    Sleep(100)
    If $gif = 6 Then
        IniWrite($filepath & "System.ini","Settings","Note","True")
    Else
        IniWrite($filepath & "System.ini","Settings","Note","False")
    EndIf
;Fourth MessageBox
    $ger = MsgBox(4096 + 36,"Setup","Log Blocked Pop-Ups?");writes .log with title of window
    Sleep(100)
    If $ger = 6 Then
        IniWrite($filepath & "System.ini","Settings","Save","True")
    Else
        IniWrite($filepath & "System.ini","Settings","Save","False")
    EndIf
;Input box for hotkey settings
    $zx = InputBox("Settings","This Hot-Key Combo will allow you to Toggle Pop-Up Blocker ON/OFF"&@CRLF&@CRLF&@CRLF&@CRLF&"Format: Ctrl+Alt+", "", " M1");max 1 character
    HotKeySet("^!" & $zx, "ToggleAllow")
    IniWrite($filepath & "System.ini","Misc","HotKey",$zx)
    Inter()
EndFunc ;==>Start

Func Inter()
    $sin = IniRead($filepath & "System.ini","Settings","Start","False")
    $saf = IniRead($filepath & "System.ini","Settings","Run","False")
    $ser = IniRead($filepath & "System.ini","Misc","HotKey","")
    If $sin = 'True' Then
        RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","~~popup","REG_SZ","C:\~~popup~~.exe")
    Else
        RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","~~popup")
    EndIf
    
    If $saf = 'True' Then
        Opt("TrayIconHide",1);hide
    Else
        Opt("TrayIconHide",0);show
        Opt("TrayMenuMode",1)
        $t_1 = TrayCreateItem("Blocked Pop-Ups")
        $t_4 = TrayCreateItem("Settings")
        $t_2 = TrayCreateItem("About")
        $t_5 = TrayCreateItem("")
        $t_3 = TrayCreateItem("Close")
        TraySetState()
    EndIf
    
    If $ser <> "" Then HotKeySet("^!" & $ser, "ToggleAllow")
        
EndFunc ;==>Inter

Func ToggleAllow() 
    If $Allow_Web = '0' Then 
        $Allow_Web = '1';1 = Off
        TraySetToolTip("Pop-Up Blocker Inactive")
    ElseIf $Allow_Web = '1' Then
        $Allow_Web = '0';0 = On
        TraySetToolTip("Pop-Up Blocker Active")
    EndIf
EndFunc ;==>ToggleAllow

While 1
    If WinExists("http://") Then
        $1 = WinGetTitle("http://")
        If $Allow_Web = '0' Then;0 = ON
        WinKill($1);WinKill(http://)???
        $666 = IniRead($filepath & "System.ini","Settings","Note","False");false =value returned if there isnt one
        $667 = IniRead($filepath & "System.ini","Settings","Save","False")
            If $666 = 'True' Then 
            $xx = StringSplit($1," - ");cut out mozilla firefox or microsoft internet explorer
            TrayTip("Pop-Up Blocked!",$xx[1] &@CRLF&"Press: Ctrl+Alt+" &$zx& " to Unblock",5,2);makes exclamation point icon
            EndIf
                If $667 = 'True' Then 
                _FileWriteLog($filepath & "BlockList.log",$xx[1])
                EndIf
        Else
            If $Allow_Web = '1' Then;1 = OFF
            FileWriteLine($filepath & "Allow.spx",$xx[1])
            EndIf
        EndIf
    EndIf
    
    If WinExists("FREE") Then
        $6 = WinGetTitle("FREE")
        If $Allow_Web = '0' Then;0 = ON
            WinKill($6)
                If $666 = 'True' Then
                    $xr = StringSplit($6," - ");cut out mozilla firefox or microsoft internet explorer
                    TrayTip("Pop-Up Blocked!",$xr[1] &@CRLF&"Press: Ctrl+Alt+" &$zx& " to Unblock",5,2);makes exclamation point icon
                EndIf
                    If $667 = 'True' Then
                        _FileWriteLog($filepath & "BlockList.log",$xr[1])
                    EndIf
        Else
            If $Allow_Web = '1' Then;1 = OFF
                FileWriteLine($filepath & "Allow.spx",$xr[1])
            EndIf
        EndIf
    EndIf
            
    $msg = TrayGetMsg()
    Select
        
    Case $msg = $t_2
        MsgBox(4096 + 32,"Information","Made By: B3TA_SCR1PT3R"&@CRLF&"Website: www.greenpurple.tk"&@CRLF&"Released: 8/9/05"&@CRLF&"Version: 3.1")
        
    Case $msg = $t_3
        ExitLoop
        
    Case $msg = $t_1
        _RunDOS("C:\POP-UP~1\BlockList.log")
            
    Case $msg = $t_4
        TrayItemDelete($t_1)
        TrayItemDelete($t_2)
        TrayItemDelete($t_3)
        TrayItemDelete($t_4)
        TrayItemDelete($t_5)
        HotKeySet("^!" & $zx)
        Start()
        
    EndSelect
WEnd

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites
=sinister=

well, its not working.

Share this post


Link to post
Share on other sites
B3TA_SCR1PT3R

well, its not working.

<{POST_SNAPBACK}>

cuz your stupid

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites
B3TA_SCR1PT3R

LoL your people skills are excellent

<{POST_SNAPBACK}>

heh..

im just messin with u "sinister"

it works fine you just dont know how to work it?


[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites
AutoChris

I must not know how to work it either because I am getting pop-ups. Perhaps you should do a little QA before posting your "AWESOME" scripts.

Pop-Up Test

Share this post


Link to post
Share on other sites
layer

I must not know how to work it either because I am getting pop-ups. Perhaps you should do a little QA before posting your "AWESOME" scripts.

Pop-Up Test

<{POST_SNAPBACK}>

@SerialKiller,

Cheers for the link ! :whistle: Quite useful. :dance:


FootbaG

Share this post


Link to post
Share on other sites
B3TA_SCR1PT3R

I must not know how to work it either because I am getting pop-ups. Perhaps you should do a little QA before posting your "AWESOME" scripts.

Pop-Up Test

<{POST_SNAPBACK}>

hrmmm this is very internesting.. how does it work on mine and not yours?

review the script it can only block em if they have "http://"(which most do) or word FREE in them... are these the type that are getting through
Edited by B3TA_SCR1PT3R

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites
AutoChris

hrmmm this is very internesting.. how does it work on mine and not yours?

Do you have XP w/SP 2? Maybe your OS is blocking the pop-ups. I had to disable the pop-up blocking in XP before testing your script. I also usually use Firefox (which normally blocks pop-ups), so I used IE when testing your script. Do you have other pop-up blockers running on your PC for IE?

Share this post


Link to post
Share on other sites
B3TA_SCR1PT3R

Do you have XP w/SP 2? Maybe your OS is blocking the pop-ups. I had to disable the pop-up blocking in XP before testing your script. I also usually use Firefox (which normally blocks pop-ups), so I used IE when testing your script. Do you have other pop-up blockers running on your PC for IE?

<{POST_SNAPBACK}>

thats why i made it because i dont have sp2 or pop up blocker

i have firefox but i turned off the pop up blocker(firefox) to test and myne(my script) blocks it

i turned it off(my script) and then alllowed a pop up and turned it back on(my script) and itlll block it

guess ill just keep it for myself since it no work anywhere else..

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites
peethebee

Hi!

I know somebody who is using my application "Click4u" to get rid of popups. perhaps you try this one.

Please search for it in the scripts & scraps subforum.

peethebee


vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Share this post


Link to post
Share on other sites
AutoChris

How is that for a "your script sucks" post, B3TA_SCR1PT3R? However, I think Peethebee was just trying to be helpful rather than insulting.

I did check the blocked pop-ups list in the folder your program creates on the C:\ drive and it did say it killed some pop-ups but on the link I posted, the pop-ups are numbered from 1-10 (on the pages with 10 pop-ups, of course) and your script only caught about 2 or 3 of them. So your pop-up killer script is working, just not as well as it could be.

Keep working at it. I would hate to see you give up on the project just due to some negative feedback.

Share this post


Link to post
Share on other sites
B3TA_SCR1PT3R

How is that for a "your script sucks" post, B3TA_SCR1PT3R? However, I think Peethebee was just trying to be helpful rather than insulting.

I did check the blocked pop-ups list in the folder your program creates on the C:\ drive and it did say it killed some pop-ups but on the link I posted, the pop-ups are numbered from 1-10 (on the pages with 10 pop-ups, of course) and your script only caught about 2 or 3 of them. So your pop-up killer script is working, just not as well as it could be.

Keep working at it. I would hate to see you give up on the project just due to some negative feedback.

<{POST_SNAPBACK}>

i didnt give up on it i use it for my comp. and it works perfectly i went to that site also

and it blocked EVERY SINGLE ONE OF THEM..so maybe its just everyone else computer..

turn off the pop up blocker then let the pop ups appear then turn it back on and it will kill them all(on my comp at least)
Edited by B3TA_SCR1PT3R

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites
=sinister=

-Figuerd Out-

Edited by =sinister=

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.