Sign in to follow this  
Followers 0
James

Conabler

17 posts in this topic

#1 ·  Posted (edited)

Hi all,

The strange name Conabler is a shortened name for Control Enabler! The genius that I am :wub:

Basically, Conabler allows you to enable any disabled controls! It uses EnablerDLL.dll by Stephen Hewitt and was inspired by Gifs Enabler that I found on his website, only mine runs in the tray!

#NoTrayIcon

#Include <Constants.au3>

Opt("TrayMenuMode", 1)

Global $DLL = DllOpen("EnablerDLL.dll"), $Hook = 0

If _Singleton(@ScriptName, 1) = 0 Then
    MsgBox(0, @ScriptName, "Conabler can only be ran once at a time!")
    Exit
EndIf

$enitem = TrayCreateItem("Disabled")
TrayCreateItem("")
$aboutitem = TrayCreateItem("About")
$exititem = TrayCreateItem("Exit")

TraySetState()

While 1
    $msg = TrayGetMsg()
    Select
        Case $msg = 0
            ContinueLoop
        Case $msg = $enitem
            If $Hook = 0 Then
                DllCall($DLL, "int", "SetHook")
                TrayItemSetText($enitem, "Enabled")
                TrayItemSetState($enitem, $TRAY_CHECKED)
                $Hook = 1
            ElseIf $Hook = 1 Then
                DllCall($DLL, "int", "ReleaseHook")
                TrayItemSetText($enitem, "Disabled")
                TrayItemSetState($enitem, $TRAY_UNCHECKED)
                $Hook = 0
            EndIf
        Case $msg = $aboutitem
            MsgBox(0, "Conabler", "Conabler is a product from James-Brooks.net" & @CRLF & @CRLF & _
                    "EnablerDLL.dll is a product of Stephen Hewitt" & @CRLF & @CRLF & _
                    "Conabler is Copyright James Brooks 2007")
        Case $msg = $exititem
            DllCall($DLL, "int", "ReleaseHook")
            DllClose($DLL)
            ExitLoop
    EndSelect
WEnd

Exit

Func _Singleton($sOccurenceName, $iFlag = 0)
    Local $ERROR_ALREADY_EXISTS = 183, $handle, $lastError
    
    $sOccurenceName = StringReplace($sOccurenceName, "\", "") ; to avoid error
    ;$handle = DllCall("kernel32.dll", "int", "CreateSemaphore", "int", 0, "long", 1, "long", 1, "str", $sOccurenceName)
    $handle = DllCall("kernel32.dll", "int", "CreateMutex", "int", 0, "long", 1, "str", $sOccurenceName)
    $lastError = DllCall("kernel32.dll", "int", "GetLastError")
    If $lastError[0] = $ERROR_ALREADY_EXISTS Then
        If $iFlag = 0 Then
            Exit -1
        Else
            Return SetError($lastError[0], $lastError[0], 0)
        EndIf
    EndIf
    Return $handle[0]
EndFunc   ;==>_Singleton

You will also need EnablerDLL.dll. Make sure it is placed in the same directory as is the script, otherwise it will not work!

I think screenshots may make this more appealing :blink:

Before Conabler:

Posted Image

After Conabler:

Posted Image

Note: Conabler cannot enable controls which have no function when enabled! It has some slight restrictions.

Any comments, suggestions, whatever are welcome!

Thankyou,

James!

P.S: :) Merry Christmas! :P

Edited by JamesB

Share this post


Link to post
Share on other sites



Marry christmas to you too!!! :)

May I ask what type of situation this is intended for?


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites

What he posted, to enable any disabled controls on a GUI.

Share this post


Link to post
Share on other sites

Hi all,

The strange name Conabler is a shortened name for Control Enabler! The genius that I am :wub:

Basically, Conabler allows you to enable any disabled controls! It uses EnablerDLL.dll by Stephen Hewitt and was inspired by Gifs Enabler that I found on his website, only mine runs in the tray!

(*code*)

You will also need EnablerDLL.dll. Make sure it is placed in the same directory as is the script, otherwise it will not work!

I think screenshots may make this more appealing :blink:

Before Conabler:

After Conabler:

Note: Conabler cannot enable controls which have no function when enabled! It has some slight restrictions.

Any comments, suggestions, whatever are welcome!

Thankyou,

James!

P.S: :) Merry Christmas! :P

I can't view screenshot. (And I told you you are only genius for Photoshop).

Nice. Now I can cheat on Club Penguin (Enable that Moderation panel!)


I can do signature me.

Share this post


Link to post
Share on other sites

is this beta only ? cuz i get an error, about undeclared vars, when i try to run the program


http://www.autoitscript.com/forum/index.php?showtopic=69911 <-- Best hacker ever :D

Share this post


Link to post
Share on other sites

Weird. What version of AutoIt do you have?

Try this:

#NoTrayIcon

#Include <Constants.au3>
#Include <Misc.au3>

Opt("TrayMenuMode", 1)

Global $DLL = DllOpen("EnablerDLL.dll"), $Hook = 0

If _Singleton(@ScriptName, 1) = 0 Then
    MsgBox(0, @ScriptName, "Conabler can only be ran once at a time!")
    Exit
EndIf

$enitem = TrayCreateItem("Disabled")
TrayCreateItem("")
$aboutitem = TrayCreateItem("About")
$exititem = TrayCreateItem("Exit")

TraySetState()

While 1
    $msg = TrayGetMsg()
    Select
        Case $msg = 0
            ContinueLoop
        Case $msg = $enitem
            If $Hook = 0 Then
                DllCall($DLL, "int", "SetHook")
                TrayItemSetText($enitem, "Enabled")
                TrayItemSetState($enitem, $TRAY_CHECKED)
                $Hook = 1
            ElseIf $Hook = 1 Then
                DllCall($DLL, "int", "ReleaseHook")
                TrayItemSetText($enitem, "Disabled")
                TrayItemSetState($enitem, $TRAY_UNCHECKED)
                $Hook = 0
            EndIf
        Case $msg = $aboutitem
            MsgBox(0, "Conabler", "Conabler is a product from James-Brooks.net" & @CRLF & @CRLF & _
                    "EnablerDLL.dll is a product of Stephen Hewitt" & @CRLF & @CRLF & _
                    "Conabler is Copyright James Brooks 2007")
        Case $msg = $exititem
            DllCall($DLL, "int", "ReleaseHook")
            DllClose($DLL)
            ExitLoop
    EndSelect
WEnd

Exit

Share this post


Link to post
Share on other sites

But aren't the disabled controls context specific? I guess I'm trying to figure out why you'd want to enable something that has no real function at the given time that it is disabled...

And yes, I read the red text stating as much as I just did, but I can't think of a single instance where I have wanted to use an option that wasn't available when I wanted to use it.

Or am I missing something?

Share this post


Link to post
Share on other sites

Marry christmas to you too!!! :)

May I ask what type of situation this is intended for?

I use it to configure proxysettings while GUI disabled by GPO's :P

Share this post


Link to post
Share on other sites
:) I have used it for a program that wasn't very well made (Not anyone in the forum). They only had it enable controls if an event occured (Correct key). The program didn't check that a key existed before it was clicked.

Share this post


Link to post
Share on other sites

Looks cool! I'll try it when i come home :)

Share this post


Link to post
Share on other sites

Realy nice... can you also enable/disable buttons with it?

Share this post


Link to post
Share on other sites

Well, Google "Stephen Hewitt" and go to his website. It explains why he made it.

I didn't see where he explains why he made it. Merely that it can be useful at times. I did see where he says that clicking on a control you've enabled through the program can have disastrous results...

Here is the same dialog but we have used the "Windows Enabler" to enable some of the controls. We can now use these controls but how the software will react can vary greatly. Sometimes the results are disastrous, YOU HAVE BEEN WARNED!!

Sounds like good advice to me. If the program isn't expecting you to access some function because the developer has it disabled at that stage and you access it anyway, it likely won't know how to deal with it and will eat your soul.

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  
Followers 0