Sign in to follow this  
Followers 0
Swift

Passworded Program?

9 posts in this topic

#1 ·  Posted (edited)

how would i create a password protected program...and you need the password to start the program basically...a input box...but you must type a password or it wont go on...wait...i belive there is a example script of this...so delete this if i find it...but....thanks for the help...and also a password to terminate/close a program.

EDIT: cool...i got the program to ask for a password...but how would i request a password to terminate the program?

Edited by Swift

Share this post


Link to post
Share on other sites



how would i create a password protected program...and you need the password to start the program basically...a input box...but you must type a password or it wont go on...wait...i belive there is a example script of this...so delete this if i find it...but....thanks for the help...and also a password to terminate/close a program.

EDIT: cool...i got the program to ask for a password...but how would i request a password to terminate the program?

Detect when the program close is selected (maybe $GUI_EVENT_CLOSE) and then ask for a password. If wrong then don't exit.

If you want to be sure you would have to register the WM_CLOSE message I expect and respond to that because someone could close the program through the task manager.


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.

Share this post


Link to post
Share on other sites

thanks marvin

Share this post


Link to post
Share on other sites

Toy around with this

#include <GUIConstants.au3>

$Password = "Password"
Do
    $pass = InputBox("Password Required", "Please Input Your Password.", "", "*")
    If $pass == $Password Then
        MsgBox(0,"Correct", "Password Correct.")
    Else
        MsgBox(0,"Invalid", "Password Invalid. Try Again.")
    EndIf
Until $Pass == $Password
;;---Your Program below:
$GUI =GUICreate("Your Program window", 200,300)
GUICtrlCreateLabel("Press the X to Close", 50,135)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            $pass = InputBox("Password Required", "Please Input Your Password.", "", "*")
            If $pass = $Password Then
                MsgBox(0,"Correct", "Password Correct. Exiting...")
                Exit
            Else
                MsgBox(0,"Invalid", "Password Invalid. Continuing...")
            EndIf
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

woot thanks paulie :) nice

Share this post


Link to post
Share on other sites

woot thanks paulie :) nice

No problem, Hope it helps. :P:blink:

Share this post


Link to post
Share on other sites

does anyone know where i can get the autoit toolbar?

Share this post


Link to post
Share on other sites

heh just got it too :) thanks again :P

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