Jump to content

BlockInput Question


Recommended Posts

Hey guys

i read the Help file for Blockinput

in this script

#include <GUIConstants.au3>
#include <String.au3>
#NoTrayIcon
MsgBox(64, "Disclaimer!", "This box will terminate in 3 seconds, by reading this you agree that you are locking your computer... If you forget your password, press Alt + V to terminate this program", 3)
Opt("WinTitleMatchMode", 4)
Opt("MouseCoordMode", 1)
Opt("CaretCoordMode", 1)
Opt("WinWaitDelay", 0)

Global Const $Password = InputBox("Enter Password", "Enter Password Here.", "", "*")
If @error Then Exit
Global Const $InputTime = 1000;<---------- EDIT THIS: This sets the time that you have to type the password
Global $Status = False
Global $oldmPos[4]
Global $cTHandle = TimerInit()
Global $oiText
Global Const $Width = 150
GLobal Const $Height = 100
Global Const $gHandle = GUICreate("Computer Locked!", $Width, $Height, -1, -1, $WS_CAPTION, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
Global Const $lHandle = GUICtrlCreateLabel("Input Password", 5, ($Height/2)-20, $Width-15)
Global Const $iHandle = GUICtrlCreateInput("", 5, $Height/2, $Width-15, -1, $ES_PASSWORD)

GUISetState()

HotKeySet("!v", "Terminate")

Func Terminate()
Exit 0

EndFunc;==>Terminate
While 1

$mPos = MouseGetPos()
$iText = GuiCtrlRead($iHandle)

If $mPos[0] <> $oldmPos[0] Or $mPos[1] <> $oldmPos[1] Then
WinMove($gHandle, "", $mPos[0]-($Width/2), $mPos[1]-($Height/2))
EndIf

If Not WinActive($gHandle) Then
WinActivate($gHandle)
EndIf
;~
If TimerDiff($cTHandle) > 1000 Then
GUICtrlSetData($lHandle, "Enter Password")
If $iText == $oiText And $iText <> "" Then
GUICtrlSetData($lHandle, "Denied h4x0r!")
GUICtrlSetData($iHandle, "")
SoundPlay(@ScriptDir & "\Deny.wav", 0)
ElseIf $iText <> $oiText And $iText == $Password Then
GUICtrlSetData($lHandle, "Access Granted!")
WinSetTitle($gHandle, "", "Computer Unlocked!")
Sleep(1)
GUIDelete($gHandle)
SoundPlay(@ScriptDir & "\Allow.wav", 1)
;~ SoundPlay(@ScriptDir & "\taunt1.wav", 1)
;~ SoundPlay(@ScriptDir & "\taunt2.wav", 1)
Exit
EndIf
$oiText = $iText
$cTHandle = TimerInit()
EndIf

$oldmPos = $mPos

Sleep(1)

If WinExists('Windows Task Manager') Then
WinClose('Windows Task Manager')
EndIf

If ProcessExists("taskmgr.exe") Then
    ProcessClose("taskmgr.exe")
EndIf

MouseMove(512,430)

WEnd

where would i put BlockInput if i dont want people to type anything?

and can you explain (1) and (0)

and at the end

if i wanted this program to copy itself in the startup

would i do

FileCopy("Vault.exe", "@StartupCommonDir)

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...