Jump to content

Recommended Posts

Posted

So... You can protect your computer or user with this. Password = "autoit".You can change it by changing code, but im working with password changer.

#include <GUIConstants.au3>
#Include <Misc.au3>
#NoTrayIcon
GUICreate("Password", 1200, 1200)
HotkeySet("{Esc}", "captureEsc")
HotKeySet("{Enter}", "PressButton")

$pass = GUICtrlCreateInput ("", 470,  560, 300, 20, $ES_PASSWORD)
$button = GUICtrlCreateButton ("OK", 600, 600, 50, 30)
GUISetState ()


While 1
    $msg = GUIGetMsg()

If $msg = $button Then

if GUICtrlRead($pass) = "autoit" Then
MsgBox(0, "Password", "Correct!")
Else 
MsgBox(16, "Error", "Access is denied!Logging out in 3 seconds!", 3)
Shutdown(0)
endif

ExitLoop
EndIf
If _IsPressed("12", "user32.dll") Then
    MsgBox(16, "Error!", "Alt key is not allowed!")
    EndIf
        
        If _IsPressed("2E", "user32.dll") Then
    MsgBox(16, "Error!", "Delete key is not allowed")
    EndIf
        If _IsPressed("73", "user32.dll") Then
    Shutdown(0)
    EndIf
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
Func captureEsc()
    MsgBox(16, "Error!", "Escape is not allowed!")
EndFunc

Func PressButton()
    $msg = $button
EndFunc
Posted

Hi!

Looks nice for a first view!

Keep it up, peethebee

p.s. only looked on the code, not tested it yet.

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

Posted (edited)

I didn't run it, but if you right click in your task bar you can open the task manager, and then you should be able to kill the program.

Edited by Ejoc
Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Posted (edited)

I have 1 problem. You can close this by pressing very, very fast Alt+F4 and how can i hide program in Task Manager?I have Win98 and i cant see it in Task Manager... How can i fix it?

Edited by poisonkiller

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
  • Recently Browsing   0 members

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