Jump to content

Recommended Posts

Posted

2, i have write this code to stop my sister from access my computer without password, but i don't know, if it show the GUI, the code (which close taskmgr.exe) doesn't work and so on, if the the code (which close taskmgr.exe) works, so i can't see the GUI ? some body can give me a explaination ?

thanks

#include <GUIConstants.au3>
#include <Misc.au3>

$killex = "Explorer.exe"
If ProcessExists($killex) Then RunWait("taskkill /F /IM " & $killex, "", @SW_HIDE);tat exprolorer
while 1
    $ctrl="11"
    $alt="12"
    $del="2E"
    
if _IsPressed($ctrl) and _IsPressed($alt) and _IsPressed($del) then;khong cho nhan Ctrl Alt Delete
    msgbox(64,"Disable","You are not allowed to press this key",1)
EndIf

$task="taskmgr.exe"
if ProcessExists($task) then ProcessClose($task)

WEnd




GUICreate("d4rk proctector ...",140,80) ; will create a dialog box that when displayed is centered
GUISetHelp("notepad") ; will run notepad if F1 is typed
GUISetState()

GUICtrlCreateLabel("::: Password To Enter :::",10,10)
$pass=GUICtrlCreateInput ("", 10,  35, 120, 20,$ES_PASSWORD)
$button=GUICtrlCreateButton("Ok, Click Here To Login", 10,  55, 120, 20)


send("{TAB}")

while 1
    $msg = GUIGetMsg()
    
if $msg=$button Then
;msgbox(64,"22","22")
    Select
    case GUICtrlRead($pass)="d4rk"
        MsgBox(64,"ok","you are d4rk")
    case Else
        MsgBox(64,"NO","not d4rk")
    EndSelect
    
EndIf

    
If $msg = $GUI_EVENT_CLOSE Then
    ExitLoop
EndIf
WEnd

=> the code above allow me to show a msgbox and close task manager but doesn't show the GUI, and when i put the GUI part code to the end, i see the GUI but i can't receive a msgbox when press Ctrl + Alt + Delelte

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Posted

Try this. I commented out the line with taskkill because I don't know what that is.

#include <GUIConstants.au3>

#include <Misc.au3>

$killex = "Explorer.exe"

;If ProcessExists($killex) Then RunWait("taskkill /F /IM " & $killex, "", @SW_HIDE);tat exprolorer

;while 1

$ctrl = "11"

$alt = "12"

$del = "2E"

;WEnd

Global $authorised = False

GUICreate("d4rk proctector ...", 140, 80) ; will create a dialog box that when displayed is centered

GUISetHelp("notepad") ; will run notepad if F1 is typed

GUISetState()

GUICtrlCreateLabel("::: Password To Enter :::", 10, 10)

$pass = GUICtrlCreateInput("", 10, 35, 120, 20, $ES_PASSWORD)

$button = GUICtrlCreateButton("Ok, Click Here To Login", 10, 55, 120, 20)

Send("{TAB}")

While 1

If Not $authorised Then

If _IsPressed($ctrl) And _IsPressed($alt) And _IsPressed($del) Then;khong cho nhan Ctrl Alt Delete

MsgBox(64, "Disable", "You are not allowed to press this key", 2)

$task = "taskmgr.exe"

If ProcessExists($task) Then ProcessClose($task)

EndIf

EndIf

$msg = GUIGetMsg()

If $msg = $button Then

;msgbox(64,"22","22")

ConsoleWrite(GUICtrlRead($pass) & @CRLF)

Select

Case GUICtrlRead($pass) = "d4rk"

MsgBox(64, "ok", "you are d4rk")

$authorised = True

Case Else

MsgBox(64, "NO", "not d4rk")

$authorised = False

EndSelect

EndIf

If $msg = $GUI_EVENT_CLOSE Then

ExitLoop

EndIf

WEnd

[/code

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Posted

thanks martin, you're cool

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

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
×
×
  • Create New...