Swift Posted December 24, 2007 Share Posted December 24, 2007 (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 December 24, 2007 by Swift Link to comment Share on other sites More sharing options...
martin Posted December 24, 2007 Share Posted December 24, 2007 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. Link to comment Share on other sites More sharing options...
Swift Posted December 24, 2007 Author Share Posted December 24, 2007 thanks marvin Link to comment Share on other sites More sharing options...
Paulie Posted December 24, 2007 Share Posted December 24, 2007 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 Link to comment Share on other sites More sharing options...
Swift Posted December 24, 2007 Author Share Posted December 24, 2007 woot thanks paulie nice Link to comment Share on other sites More sharing options...
Paulie Posted December 24, 2007 Share Posted December 24, 2007 woot thanks paulie niceNo problem, Hope it helps. Link to comment Share on other sites More sharing options...
Swift Posted December 24, 2007 Author Share Posted December 24, 2007 does anyone know where i can get the autoit toolbar? Link to comment Share on other sites More sharing options...
Paulie Posted December 24, 2007 Share Posted December 24, 2007 does anyone know where i can get the autoit toolbar?http://autoitscript.communitytoolbars.com/ Link to comment Share on other sites More sharing options...
Swift Posted December 24, 2007 Author Share Posted December 24, 2007 heh just got it too thanks again Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now