Jump to content

Recommended Posts

Posted (edited)

The shutdown timer program simply lets users logoff, restart, shutdown, run a program, display a full screen bitmap as a lockout screen and display a reminder "Stove is on! Go turn it off!"

I need the lockout screen to stop the functionality of the start button and taskbar. When I right click the full screen

the inputbox is visible so I can type the password in, but the start button and taskbar are also visible. Is there a way to have the screen overlap the taskbar?

Here is the code...

#NoTrayIcon

#include <e:\documents\autoit3\include\GUIConstants.au3>

#include <e:\documents\autoit3\include\String.au3>

#Include <e:\documents\autoit3\include\date.au3>

$getstate = Wingetstate("Shutdown Timer... V.1.0")

If BitAnd($getstate, 1+4) Then

msgbox(16,"Shutdown Timer...","There is already a copy of shutdown timer running...")

exit

endif

SplashImageOn("","e:\documents\splash.bmp", 297, 137, -1, -1, 1)

sleep(2000)

SplashOff()

WinMinimizeAll()

$window = GUICreate("Shutdown Timer... V.1.0", 220, 290, -1 ,-1, -1)

$hours = GUICtrlCreateInput("", 40, 10, 35, 20, $ES_NUMBER)

$spinner = GUICtrlCreateUPDown(-1)

GUICtrlSetLimit($spinner,99,0)

$minutes = GUICtrlCreateInput("", 80, 10, 35, 20, $ES_NUMBER)

$spinner = GUICtrlCreateUPDown(-1)

GUICtrlSetLimit($spinner,59,0)

$seconds = GUICtrlCreateInput("", 120, 10, 35, 20, $ES_NUMBER)

$spinner = GUICtrlCreateUPDown(-1)

GUICtrlSetLimit($spinner,59,0)

$secondstext = GUICtrlCreatelabel("sec", 122, 30, 20, 20)

$hourstext = GUICtrlCreatelabel("min", 82, 30, 20, 20)

$minstext = GUICtrlCreatelabel("hrs", 42, 30, 20, 20)

GUICtrlCreateLabel(":",116, 12, 3,15, 0)

GUICtrlCreateLabel(":",76, 12, 3,15, 0)

$startservice = GUICtrlCreateButton("&Start",165,8,50,25, $BS_FLAT)

$stopservice = GUICtrlCreateButton("S&top", 165,8, 50, 25, $BS_FLAT)

GUISetOnEvent(-1,"Stop")

$icon = GUICtrlCreateIcon("e:\Visual_tools\icons\waitshutdown.ico",-1, 3, 3, $SS_ICON)

$group = GUICtrlCreateGroup("Options",5,50,210,235, -1)

$logoff = GUICtrlCreateRadio("Logoff", 10, 65, 100, 20, -1)

$restart = GUICtrlCreateRadio("Reboot", 10, 85, 100, 20, -1)

$shutdown = GUICtrlCreateRadio("Shutdown", 10, 105, 100, 20, -1)

$note = GUICtrlCreateRadio("Display a note...", 10, 145, 150, 20, -1)

$lock = GUICtrlCreateRadio("Display a bitmapped screen...", 10, 125, 193, 20, -1)

$browse = GUICtrlCreateButton("",185,185,20,20, $BS_ICON)

$run = GUICtrlCreateRadio("Launch A Program...", 10, 165, 150, 20, -1)

GUICtrlSetImage($browse, "e:\visual_tools\icons\smallfolder.ico",-1,0)

$program = GUICtrlCreateInput("", 15, 185, 165, 20, -1)

$notereminder = GUICtrlCreateEdit("Type your text here...",15,220,190,55,-1)

GUICtrlSetTip ( $startservice, "Starts the timer service" )

GUICtrlSetTip ( $stopservice, "Stops the timer service using a verified password." )

GUICtrlSetState($stopservice, $GUI_HIDE)

GUICtrlSetState($logoff, $GUI_CHECKED)

Winsetstate("About","",@SW_HIDE)

GUIsetState()

While 1

$radio = GUICtrlRead($run)

$radionote = GUICtrlRead($note)

if $radio = $GUI_CHECKED and $radionote = $GUI_UNCHECKED then

ControlEnable("","",$program)

ControlEnable("","",$browse)

ControlDisable("","",$notereminder)

endif

if $radio = $GUI_UNCHECKED and $radionote = $GUI_UNCHECKED then

ControlDisable("","",$program)

ControlDisable("","",$browse)

ControlDisable("","",$notereminder)

endif

if $radio = $GUI_UNCHECKED and $radionote = $GUI_CHECKED then

ControlDisable("","",$program)

ControlDisable("","",$browse)

ControlEnable("","",$notereminder)

elseif $radionote = $GUI_UNCHECKED then

ControlDisable("","",$notereminder)

endif

$optionlogoff = GUICtrlRead($logoff)

$optionrestart = GUICtrlRead($restart)

$optionShutdown = GUICtrlRead($Shutdown)

$optionRun = GUICtrlRead($program)

$optionlockout = GUICtrlRead($lock)

$optionnote = GUICtrlRead($note)

$optionremind = GUICtrlRead($notereminder)

$msg = GUIGetMsg()

Select

Case $msg = $startservice

if $radio = $GUI_CHECKED then

$checkfile = GUICtrlRead($program)

if $checkfile = "" then

msgbox(16,"Shutdown Timer...","You didn't specify a file to run...")

continueloop

endif

if not fileexists($checkfile) then

msgbox(16,"Shutdown Timer...","File or path doesn't exist")

continueloop

endif

endif

$readhours = GUICtrlRead($hours)

$readminutes = GUICtrlRead($minutes)

$readseconds = GUICtrlRead($seconds)

if $readseconds = 0 and $readhours = 0 and $readminutes = 0 then

msgbox(16 + 8192,"Shutdown Timer...","You must enter a valid time.")

continueloop

elseif $readseconds = "" and $readhours = "" and $readminutes = "" then

msgbox(16 + 8192,"Shutdown Timer...","You must enter a valid time.")

continueloop

elseif $readminutes > 59 or $readseconds > 59 then

msgbox(16 + 8192,"Shutdown Timer...","Time is out of range. Time must be in 99:59:59 range.")

continueloop

endif

$startpassword = Inputbox("Shutdown Timer...","Enter a service password. This will prevent users from stopping the timer service.","","*",350,140)

$savedpassword = GUICtrlRead($startpassword)

if $startpassword = "" then

msgbox(16 + 8192,"Shutdown Timer...","The password cannot be blank. Please enter a password")

continueloop

endif

$retype = Inputbox("Shutdown Timer...","Enter the password again for verification.","","*",350,140)

$readretype = GUICtrlRead($retype)

if $retype = $startpassword then

msgbox(64 + 8192,"Shutdown Timer...","Password has been set")

else

msgbox(16 + 8192,"Shutdown Timer...","The passwords don't match. Retype the passwords and try again.")

continueloop

endif

GUICtrlSetState($stopservice, $GUI_SHOW)

GUICtrlSetState($startservice, $GUI_HIDE)

Regwrite("HKCU\Software\Microsoft\Windows\Currentversion\Policies\System","DisableTaskMgr","REG_DWORD",00000001) <--- This line is to stop user from stopping the timer by closing the process, instead a password must be entered.

GUICtrlSetState($restart, $GUI_DISABLE)

GUICtrlSetState($shutdown, $GUI_DISABLE)

GUICtrlSetState($logoff, $GUI_DISABLE)

GUICtrlSetState($program, $GUI_DISABLE)

GUICtrlSetState($run, $GUI_DISABLE)

GUICtrlSetState($browse, $GUI_DISABLE)

GUICtrlSetState($lock, $GUI_DISABLE)

GUICtrlSetState($spinner, $GUI_DISABLE)

GUICtrlSetState($hours, $GUI_DISABLE)

GUICtrlSetState($minutes, $GUI_DISABLE)

GUICtrlSetState($seconds, $GUI_DISABLE)

GUICtrlSetState($note, $GUI_DISABLE)

GUICtrlSetState($notereminder, $GUI_DISABLE)

WinSetState("", "",@SW_MINIMIZE)

timeme()

WinsetTitle("Shutdown Timer...","","Shutdown Timer... V.1.0")

continueloop

Case $msg = $stopservice

stop()

continueloop

Case $msg = $GUI_EVENT_CLOSE

RegDelete("HKCU\Software\Microsoft\Windows\Currentversion\Policies\System","DisableTaskMgr")

exit

Case $msg = $browse

$file = Fileopendialog("Run Program...", @programfilesdir, "Programs (*.exe;*.com;*.bat;*.scr)" , 1+2)

If @error = 1 Then

GUICtrlSetData($program,"")

elseif @error <> 1 then

GUICtrlSetData($program, $file)

endif

Case $msg = $lock

$pictureopen = Fileopendialog("Choose Bitmap otherwise default colour is black...", @homedrive, "Picture Files (*.bmp;*.jpg;*.gif)" , 1+2)

if @error = 1 then

GUICtrlSetData($pictureopen,"")

endif

Endselect

Wend

Func Stop()

$stoppassword = Inputbox("Shutdown Timer...","Enter the service password to stop timer.","","*",350,140,-1,-1,10)

$verify = GUICtrlRead($stoppassword)

if $startpassword = $stoppassword then

GUICtrlSetState($startservice,$GUI_SHOW)

GUICtrlSetState($stopservice, $GUI_HIDE)

GUICtrlSetState($restart, $GUI_ENABLE)

GUICtrlSetState($shutdown, $GUI_ENABLE)

GUICtrlSetState($logoff, $GUI_ENABLE)

GUICtrlSetState($program, $GUI_ENABLE)

GUICtrlSetState($run, $GUI_ENABLE)

GUICtrlSetState($browse, $GUI_ENABLE)

GUICtrlSetState($lock, $GUI_ENABLE)

GUICtrlSetState($spinner, $GUI_ENABLE)

GUICtrlSetState($hours, $GUI_ENABLE)

GUICtrlSetState($minutes, $GUI_ENABLE)

GUICtrlSetState($seconds, $GUI_ENABLE)

GUICtrlSetState($note, $GUI_ENABLE)

GUICtrlSetState($notereminder, $GUI_ENABLE)

msgbox(64 + 8192,"Shutdown Timer...","Timer service is inactive. To start timer press start service")

RegDelete("HKCU\Software\Microsoft\Windows\Currentversion\Policies\System","DisableTaskMgr")

else

msgbox(16 + 8192,"Shutdown Timer...","Invalid Service Password.",1)

endif

endfunc

Func TimeMe()

$time = $readseconds + $readminutes * 60 + $readhours * 3600

_TicksToTime($time, $readhours, $readminutes, $readseconds)

$begin = TimerInit()

Do

$msg2 = GUIGetMsg()

if $msg2 = $GUI_EVENT_CLOSE then

$stoppassword = Inputbox("Shutdown Timer..." & $time & " secs","Enter the service password to quit.","","*",350,140,-1,-1,10)

$verify = GUICtrlRead($stoppassword)

if $startpassword = $stoppassword then

Regwrite("HKCU\Software\Microsoft\Windows\Currentversion\Policies\System","DisableTaskMgr","REG_DWORD",00000000)

exit

else

msgbox(16 + 8192,"Shutdown Timer..." & $time & " secs","Invalid Service Password.",1)

endif

endif

If $msg2 = $stopservice then

$stoppassword = Inputbox("Shutdown Timer..." & $time & " secs","Enter the service password to stop timer.","","*",350,140-1,-1,10)

$verify = GUICtrlRead($stoppassword)

if $startpassword = $stoppassword then

GUICtrlSetState($startservice,$GUI_SHOW)

GUICtrlSetState($stopservice, $GUI_HIDE)

GUICtrlSetState($restart, $GUI_ENABLE)

GUICtrlSetState($shutdown, $GUI_ENABLE)

GUICtrlSetState($logoff, $GUI_ENABLE)

GUICtrlSetState($program, $GUI_ENABLE)

GUICtrlSetState($run, $GUI_ENABLE)

GUICtrlSetState($browse, $GUI_ENABLE)

GUICtrlSetState($lock, $GUI_ENABLE)

GUICtrlSetState($spinner, $GUI_ENABLE)

GUICtrlSetState($hours, $GUI_ENABLE)

GUICtrlSetState($minutes, $GUI_ENABLE)

GUICtrlSetState($seconds, $GUI_ENABLE)

GUICtrlSetState($note, $GUI_ENABLE)

GUICtrlSetState($notereminder, $GUI_ENABLE)

msgbox(64 + 8192,"Shutdown Timer..." & $time & " secs","Timer service is inactive. To start timer press start service")

RegDelete("HKCU\Software\Microsoft\Windows\Currentversion\Policies\System","DisableTaskMgr")

return

else

msgbox(16 + 8192,"Shutdown Timer..." & $time & " secs","Invalid Service Password.",1)

continueloop

endif

endif

$dif = TimerDiff($begin)

If $dif >= 1000 Then

$time = $time - 1

WinSetTitle("Shutdown Timer...","", "Shutdown Timer..." & $time )

if $time = 59 then

msgbox(64,"Shutdown Timer..." & $time, "1 Minute Remaining....",1)

endif

$begin = TimerInit()

endif

Until $time = 0

if $optionnote = $GUI_CHECKED then

$timeup = GUICreate("Reminder...", 400, 150, -1 ,-1, $WS_POPUP)

GUISetBkColor($timeup, 0x0000000)

$remind = GUICtrlCreateLabel(@CRLF & $optionremind, 50,0,300,200,$UDS_WRAP)

GUICtrlSetFont($remind, 14, 400,4,"Tahoma")

GUICtrlSetColor($remind, 0x00ff000)

$icon = GUICtrlCreateIcon("e:\Visual_tools\icons\waitshutdown.ico",-1, 10, 30, $SS_ICON)

GuiSetState()

GUICtrlSetState($remind, $GUI_SHOW)

sleep(1000)

GUICtrlSetState($remind, $GUI_HIDE)

sleep(1000)

GUICtrlSetState($remind, $GUI_SHOW)

sleep(1000)

GUICtrlSetState($remind, $GUI_HIDE)

sleep(1000)

GUICtrlSetState($remind, $GUI_SHOW)

sleep(1000)

GUICtrlSetState($remind, $GUI_HIDE)

GUIDelete("Reminder...")

GUICtrlSetState($startservice,$GUI_SHOW)

GUICtrlSetState($stopservice, $GUI_HIDE)

GUICtrlSetState($restart, $GUI_ENABLE)

GUICtrlSetState($shutdown, $GUI_ENABLE)

GUICtrlSetState($logoff, $GUI_ENABLE)

GUICtrlSetState($program, $GUI_ENABLE)

GUICtrlSetState($run, $GUI_ENABLE)

GUICtrlSetState($browse, $GUI_ENABLE)

GUICtrlSetState($lock, $GUI_ENABLE)

GUICtrlSetState($spinner, $GUI_ENABLE)

GUICtrlSetState($hours, $GUI_ENABLE)

GUICtrlSetState($minutes, $GUI_ENABLE)

GUICtrlSetState($seconds, $GUI_ENABLE)

GUICtrlSetState($note, $GUI_ENABLE)

GUICtrlSetState($notereminder, $GUI_ENABLE)

return

endif

if $radio = $GUI_CHECKED then

$timeup = GUICreate("Running Program...", 220, 100, -1 ,-1, $WS_POPUP)

GUISetBkColor($timeup, 0x0000000)

$remind = GUICtrlCreateLabel(@CRLF & "Running Program...", 25,0,200,200,$UDS_WRAP)

GUICtrlSetFont($remind, 14, 400,4,"Tahoma")

GUICtrlSetColor($remind, 0x0ff0000)

$icon = GUICtrlCreateIcon("e:\Visual_tools\icons\waitshutdown.ico",-1, 10, 30, $SS_ICON)

GuiSetState()

GUICtrlSetState($remind, $GUI_SHOW)

sleep(1000)

GUICtrlSetState($remind, $GUI_HIDE)

sleep(1000)

GUICtrlSetState($remind, $GUI_SHOW)

sleep(1000)

GUICtrlSetState($remind, $GUI_HIDE)

sleep(1000)

GUICtrlSetState($remind, $GUI_SHOW)

sleep(1000)

GUICtrlSetState($remind, $GUI_HIDE)

GUIDelete("Reminder...")

GUICtrlSetState($startservice,$GUI_SHOW)

GUICtrlSetState($stopservice, $GUI_HIDE)

GUICtrlSetState($restart, $GUI_ENABLE)

GUICtrlSetState($shutdown, $GUI_ENABLE)

GUICtrlSetState($logoff, $GUI_ENABLE)

GUICtrlSetState($program, $GUI_ENABLE)

GUICtrlSetState($run, $GUI_ENABLE)

GUICtrlSetState($browse, $GUI_ENABLE)

GUICtrlSetState($lock, $GUI_ENABLE)

GUICtrlSetState($spinner, $GUI_ENABLE)

GUICtrlSetState($hours, $GUI_ENABLE)

GUICtrlSetState($minutes, $GUI_ENABLE)

GUICtrlSetState($seconds, $GUI_ENABLE)

GUICtrlSetState($note, $GUI_ENABLE)

GUICtrlSetState($notereminder, $GUI_ENABLE)

run($optionrun)

return

endif

if $optionlogoff = $GUI_CHECKED then

shutdown(0)

endif

if $optionshutdown = $GUI_CHECKED then

shutdown(1)

endif

if $optionrestart = $GUI_CHECKED then

shutdown(2)

endif

if $optionlockout = $GUI_CHECKED then

$timeup2 = GUICreate("Time's Up...", 220, 100, -1 ,-1, $WS_POPUP)

GUISetBkColor($timeup2, 0x0000000)

$lab2 = GUICtrlCreateLabel(@CRLF & "Time's Up...", 25,0,200,200,$UDS_WRAP)

GUICtrlSetFont($lab2, 18, 400,4,"Tahoma")

GUICtrlSetColor($lab2, 0x0ff0000)

$icon2 = GUICtrlCreateIcon("e:\Visual_tools\icons\waitshutdown.ico",-1, 10, 30, $SS_ICON)

GuiSetState()

GUICtrlSetState($lab2, $GUI_SHOW)

sleep(1000)

GUICtrlSetState($lab2, $GUI_HIDE)

sleep(1000)

GUICtrlSetState($lab2, $GUI_SHOW)

sleep(1000)

GUICtrlSetState($lab2, $GUI_HIDE)

sleep(1000)

GUICtrlSetState($lab2, $GUI_SHOW)

sleep(1000)

GUICtrlSetState($lab2, $GUI_HIDE)

GUIDelete("Time Up...")

GUICtrlSetState($startservice,$GUI_SHOW)

GUICtrlSetState($stopservice, $GUI_HIDE)

GUICtrlSetState($restart, $GUI_ENABLE)

GUICtrlSetState($shutdown, $GUI_ENABLE)

GUICtrlSetState($logoff, $GUI_ENABLE)

GUICtrlSetState($program, $GUI_ENABLE)

GUICtrlSetState($run, $GUI_ENABLE)

GUICtrlSetState($browse, $GUI_ENABLE)

GUICtrlSetState($lock, $GUI_ENABLE)

GUICtrlSetState($spinner, $GUI_ENABLE)

GUICtrlSetState($hours, $GUI_ENABLE)

GUICtrlSetState($minutes, $GUI_ENABLE)

GUICtrlSetState($seconds, $GUI_ENABLE)

GUICtrlSetState($note, $GUI_ENABLE)

GUICtrlSetState($notereminder, $GUI_ENABLE)

BlockWindow()

endif

endfunc

Func BlockWindow()

Winsetstate("Shutdown Timer...","",@SW_HIDE)

WinsetState("","",@SW_HIDE)

$block = GUICreate("Block",@desktopwidth,@desktopheight,0,0,$WS_POPUP + $WS_EX_LAYERED)

GUISetBkColor($block,0x0000000)

$contextmenuwindow = GUICtrlCreatePic($pictureopen,0,0,@desktopwidth,@desktopheight,$SS_CENTERIMAGE + $SS_NOTIFY)

$contextmenu = GUICtrlCreateContextMenu($contextmenuwindow)

$Restoretimer = GUICtrlCreateMenuItem("Restore Timer Window",$contextmenu)

GUICtrlCreateMenuItem("",$contextmenu)

$Quitthis = GUICtrlCreateMenuItem("Exit",$contextmenu)

WinSetonTop("Block","",0)

GUISetState()

While 3

$context = GUIGetMsg()

If $context = $Restoretimer then

$stoppassword = Inputbox("Shutdown Timer...","Enter the service password to restore the timer window.","","*",350,140,-1,-1,10)

$verify = GUICtrlRead($stoppassword)

if $startpassword = $stoppassword then

RegDelete("HKCU\Software\Microsoft\Windows\Currentversion\Policies\System","DisableTaskMgr")

WinMinimizeAllUndo()

WinsetState("Block","",@SW_HIDE)

WinsetState("Shutdown Timer...","",@SW_SHOW)

GUICtrlSetState($startservice, $GUI_SHOW)

GUICtrlSetState($stopservice, $GUI_HIDE)

GUICtrlSetState($restart, $GUI_ENABLE)

GUICtrlSetState($shutdown, $GUI_ENABLE)

GUICtrlSetState($logoff, $GUI_ENABLE)

GUICtrlSetState($program, $GUI_ENABLE)

GUICtrlSetState($run, $GUI_ENABLE)

GUICtrlSetState($browse, $GUI_ENABLE)

GUICtrlSetState($lock, $GUI_ENABLE)

GUICtrlSetState($spinner, $GUI_ENABLE)

GUICtrlSetState($hours, $GUI_ENABLE)

GUICtrlSetState($minutes, $GUI_ENABLE)

GUICtrlSetState($seconds, $GUI_ENABLE)

GUICtrlSetState($note, $GUI_ENABLE)

GUICtrlSetState($notereminder, $GUI_ENABLE)

return

else

msgbox(16 + 8192,"Shutdown Timer...","Invalid Service Password.",1)

endif

endif

if $context = $Quitthis then

$stoppassword = Inputbox("Shutdown Timer...","Enter the service password to quit.","","*",350,140,-1,-1,10)

$verify = GUICtrlRead($stoppassword)

if $startpassword = $stoppassword then

exit

else

msgbox(16 + 8192,"Shutdown Timer...","Invalid Service Password.",1)

endif

endif

wend

endfunc

Edited by eynstyne
F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent]
Posted

Why not just do something like --

SplashTextOn("abc", "xyz.", 999999999, 99999999, -60000, -60000, 1, "", 12)
Sleep(10000)
SplashOff()

?

you would have to block keys also

(and it was intentionally made stupidly large - for the simple reason that I use three or four monitors normally - and one of them always is negative position both top and left)

Posted

Yes, but the splash screen can be overided by pressing the start key. I've have found a way to remove the start button from the tray but I can still press the start key and access the menu, I thought of trying to import policy registry keys, but some of them need a reboot to work.

I never really thought of a rediculously huge splash screen, but it's more than what I can come up with

F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent]
Posted

This is an example of program i made for myself to keep people off my computer

the looped calls of WinActivate keep the start menu from being used

#include <GuiConstants.au3>
#include <Misc.au3>

Dim $Password
Dim $GuI
Dim $Windows
Dim $Size
$gui=GuiCreate("Lock", @DesktopWidth*2, @DesktopHeight,0, 0, $WS_POPUP)
GUISetBkColor (0x000000,$Gui)
$Input_1 = GuiCtrlCreateInput("", 1, 1, @DesktopWidth - 62, 20, $ES_PASSWORD)
$Button_2 = GuiCtrlCreateButton("Execute", @DesktopWidth - 61, 1, 60, 20,$BS_DEFPUSHBUTTON)

GuiSetState()
Send("#m");minimize all currently open windows


While 1
    MouseMove(0,0,0);move mouse to top corner
    _MouseTrap (0,0); trap it there
    if WinExists("Windows Task Manager") Then;close taskman if it exists
        Winclose("Windows Task Manager")
    Endif
        WinSetOnTop ( $Gui, "", 1);set topmost flag
    WinActivate($Gui);activate window
    ControlFocus($Gui,"",$Input_1);give input box focus
    sleep(1)

    $msg = GuiGetMsg()
    Select
    Case $msg =$Button_2
        $Password=GuiCtrlRead($Input_1)
        if $Password="PASSWORD" Then;replace password with your own
            Exit
        EndIf
        
        Guictrlsetdata($input_1,"");clear input box if wrong password is entered
    Case else
        
    EndSelect
WEnd
Exit
Posted

Thanks for your code. I might need to add a mousetrap command since I only had Autoit3. This is exactly the idea I was looking for TYVM.

F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent]
  • 2 years later...
Posted (edited)

CODE
Run("taskmgr.exe", "", @SW_DISABLE)

ControlDisable ( "classname=Shell_TrayWnd", "", "ToolbarWindow321")

ControlDisable ( "classname=Shell_TrayWnd", "", "ToolbarWindow322")

ControlDisable ( "classname=Shell_TrayWnd", "", "ToolbarWindow323")

ControlDisable ( "classname=Shell_TrayWnd", "", "Button1")

WinSetState("Program Manager", "", @SW_HIDE)

WinSetState ( "classname=Progman", "",@SW_DISABLE)

WinSetState ( "DV2ControlHost", "",@SW_HIDE)

WinMinimizeAll()

ControlSetText("classname=Shell_TrayWnd", "", "Button1", "*V*")

WinSetState("Classname=Shell_TrayWnd", "", @SW_HIDE)

would pretty much disable everything. That would be bad since there would be no way to exit the prog.

edited out questionable material*

Edited by metalicaman8

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