Jump to content

help with process blocker


Recommended Posts

hi there,

I'm in the process of making my own process blocker (and web page blocker), But I have come across a couple of problems. I have made a GUI that pops up when SHIFT+ALT+r is pressed, and lets you edit the name of the process and the title window. However, it doesn't seem to change the focus (aka firefox.exe is still filtered, and it triggers it to shutdown when someone goes to runescape.com). Here is my source so far:

#Region;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=My Documents\My Pictures\runescapeheader.ico
#AutoIt3Wrapper_outfile=rs_blocker.exe
#AutoIt3Wrapper_Allow_Decompile=n
#AutoIt3Wrapper_Res_Comment=made by s0l1dsnak3123
#AutoIt3Wrapper_Res_Description=blocks runescape and gives a nice message :)
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Run_Obfuscator=y
#EndRegion;**** Directives created by AutoIt3Wrapper_GUI ****
TraySetState(2);hide tray icon
$title = "RuneScape - the massive online adventure game by Jagex Ltd - Mozilla Firefox"
$process = "firefox.exe"
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("ADMIN", 356, 172, 193, 115)
$Input1 = GUICtrlCreateInput($process, 192, 32, 145, 21)
$Input2 = GUICtrlCreateInput($title, 192, 72, 145, 21)
$Label1 = GUICtrlCreateLabel("Name of process to filter: ", 16, 32, 124, 17)
$Label2 = GUICtrlCreateLabel("Title:", 16, 72, 27, 17)
$Button1 = GUICtrlCreateButton("OK", 136, 136, 81, 25, 0)

HotKeySet("+!r", "admin")
main()
Func main()

    Do
        #region --- ScriptWriter generated code Start ---
        WinWait($title, ""); wait $title
        ProcessClose($process);close $process
        MsgBox(0, "Blocked", "This program has been blocked by s0l1dsnak3123's process filter.");give message to client
    Until 2 = 1;infinite loop
EndFunc ;==>main
Func admin()
    GUISetState(@SW_SHOW)
    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                $process = $Input1;inputbox 1 = $process
                $title = $Input2; inputbox2 = $title
                GUISetState(@SW_HIDE)
                main()

            Case $Button1
                $process = $Input1;inputbox 1 = $process
                $title = $Input2; inputbox2 = $title
                GUISetState(@SW_HIDE)
                main()
        EndSwitch
    WEnd
EndFunc ;==>admin

I tried searching this forum, and I tried searching Google, but no joy.

what am I doing wrong? Please help.

Edited by s0l1dsnak3123
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...