Norky Posted April 18, 2006 Posted April 18, 2006 Hi Everyone, I have got GUI window and Im trying to add secure popup Login window for multi-user, must user enter his/her username and password to access the window, user be able change password. I will appreciate if somebody recommend me. Thanks in advance.
Valuater Posted April 18, 2006 Posted April 18, 2006 can you show us your script that you have .... then we can help 8)
Norky Posted April 18, 2006 Author Posted April 18, 2006 can you show us your script that you have .... then we can help8)Here you go:#include <GUIConstants.au3>#NoTrayIcon$Form1 = GUICreate("KHM", 1020, 710, 0, 0)GuiSetIcon(@SystemDir & "\syncapp.exe", 0)Global $mnuFile, $mnuEdit, $h_ToolBar, $h_Rebar, $mnuExit, $button $mnuFile = GUICtrlCreateMenu("&File") $IDM_OPEN = GUICtrlCreateMenuItem("Open", $mnuFile) $IDM_SAVE = GUICtrlCreateMenuItem("Save", $mnuFile) GUICtrlCreateMenuItem("", $mnuFile, 2) ; create a separator line $mnuExit = GUICtrlCreateMenuItem("Exit", $mnuFile) $mnuEdit = GUICtrlCreateMenu("&Edit") $IDM_CUT = GUICtrlCreateMenuItem("Cut", $mnuEdit) $IDM_COPY = GUICtrlCreateMenuItem("Copy", $mnuEdit) $IDM_PASTE = GUICtrlCreateMenuItem("Paste", $mnuEdit) GUICtrlCreateMenuItem("", $mnuEdit, 3) ; create a separator line $IDM_UNDO = GUICtrlCreateMenuItem("Undo", $mnuEdit) $IDM_REDO = GUICtrlCreateMenuItem("Redo", $mnuEdit) $mnuHelp = GUICtrlCreateMenu("&Help") $IDM_ABOUT= GUICtrlCreateMenuItem("About", $mnuHelp) $IDM_HELP = GUICtrlCreateMenuItem("Help", $mnuHelp)$Obj = ObjCreate("Shell.Explorer.2")$browser = GUICtrlCreateObj($Obj, 0, 64, 1015, 620)$Button1 = GUICtrlCreateButton("HOME", 24, 8, 73, 25)$Button2 = GUICtrlCreateButton("BACK", 24, 35, 73, 25)$Button3 = GUICtrlCreateButton("FOWARD", 184, 24, 73, 25)GuiCtrlCreateDate("", 600, 24, 180, 20)GUISetState(@SW_SHOW)Opt("TrayOnEventMode",1)Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown.TraySetClick(16) ; Only secondary mouse button will show the tray menu.$infoitem = TrayCreateItem("Info")TrayItemSetOnEvent(-1,"ShowInfo")TrayCreateItem("")$exititem = TrayCreateItem("Exit")TrayItemSetOnEvent(-1,"ExitScript")TraySetState()$Obj.Navigate ('www.autoitscript.com')While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $Obj.Navigate ('www.autoitscript.com/forum') Case $msg = $Button2 $Obj.GoBack Case $msg = $Button3 RunWait(@COMSPEC & " /c Start index.au3") Case $msg = $IDM_OPEN $file = FileOpenDialog("Choose file...",@TempDir,"All (*.*)") If @error <> 1 Then GuiCtrlCreateMenuItem ($file,$recentfilesmenu) Case $msg = $mnuExit ExitLoop Case $msg = $IDM_ABOUT Msgbox(0,"About","KHM Viersion 0.1 Create by R.Norky © 2006") case Else EndSelectWEndGUIDelete()ExitWhile 1 Sleep(10) ; Idle loopWEndExit; FunctionsFunc ShowInfo() Msgbox(0,"Info","KHM Viersion 0.1 Create by R.Norky © 2006")EndFuncFunc ExitScript() ExitEndFunc
Valuater Posted April 18, 2006 Posted April 18, 2006 this can help get you started expandcollapse popup#include <GUIConstants.au3> #NoTrayIcon Global $passname = "autoit" Global $mnuFile, $mnuEdit, $h_ToolBar, $h_Rebar, $mnuExit, $button, $recentfilesmenu, $pass Check_password() If $pass <> 1 then Exit $Form1 = GUICreate("KHM", 1020, 710, 0, 0) GuiSetIcon(@SystemDir & "\syncapp.exe", 0) $mnuFile = GUICtrlCreateMenu("&File") $IDM_OPEN = GUICtrlCreateMenuItem("Open", $mnuFile) $IDM_SAVE = GUICtrlCreateMenuItem("Save", $mnuFile) GUICtrlCreateMenuItem("", $mnuFile, 2); create a separator line $mnuExit = GUICtrlCreateMenuItem("Exit", $mnuFile) $mnuEdit = GUICtrlCreateMenu("&Edit") $IDM_CUT = GUICtrlCreateMenuItem("Cut", $mnuEdit) $IDM_COPY = GUICtrlCreateMenuItem("Copy", $mnuEdit) $IDM_PASTE = GUICtrlCreateMenuItem("Paste", $mnuEdit) GUICtrlCreateMenuItem("", $mnuEdit, 3); create a separator line $IDM_UNDO = GUICtrlCreateMenuItem("Undo", $mnuEdit) $IDM_REDO = GUICtrlCreateMenuItem("Redo", $mnuEdit) $mnuHelp = GUICtrlCreateMenu("&Help") $IDM_ABOUT= GUICtrlCreateMenuItem("About", $mnuHelp) $IDM_HELP = GUICtrlCreateMenuItem("Help", $mnuHelp) $Obj = ObjCreate("Shell.Explorer.2") $browser = GUICtrlCreateObj($Obj, 0, 64, 1015, 620) $Button1 = GUICtrlCreateButton("HOME", 24, 8, 73, 25) $Button2 = GUICtrlCreateButton("BACK", 24, 35, 73, 25) $Button3 = GUICtrlCreateButton("FOWARD", 184, 24, 73, 25) GuiCtrlCreateDate("", 600, 24, 180, 20) GUISetState(@SW_SHOW) Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1); Default tray menu items (Script Paused/Exit) will not be shown. TraySetClick(16); Only secondary mouse button will show the tray menu. $infoitem = TrayCreateItem("Info") TrayItemSetOnEvent(-1,"ShowInfo") TrayCreateItem("") $exititem = TrayCreateItem("Exit") TrayItemSetOnEvent(-1,"ExitScript") TraySetState() $Obj.Navigate ('www.autoitscript.com') While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $Obj.Navigate ('www.autoitscript.com/forum') Case $msg = $Button2 $Obj.GoBack Case $msg = $Button3 RunWait(@COMSPEC & " /c Start index.au3") Case $msg = $IDM_OPEN $file = FileOpenDialog("Choose file...",@TempDir,"All (*.*)") If @error <> 1 Then GuiCtrlCreateMenuItem ($file,$recentfilesmenu) Case $msg = $mnuExit ExitLoop Case $msg = $IDM_ABOUT Msgbox(0,"About","KHM Viersion 0.1 Create by R.Norky © 2006") case Else EndSelect WEnd GUIDelete() Exit While 1 Sleep(10); Idle loop WEnd Exit ; Functions Func ShowInfo() Msgbox(0,"Info","KHM Viersion 0.1 Create by R.Norky © 2006") EndFunc Func ExitScript() Exit EndFunc Func Check_password() $name = InputBox("Password required", "Please type in your password") if $name = $passname Then $pass = 1 EndFunc 8)
Norky Posted April 18, 2006 Author Posted April 18, 2006 Thanks for your suggestion. Is that any way I can do for user changing password?
exodius Posted April 19, 2006 Posted April 19, 2006 Thanks for your suggestion. Is that any way I can do for user changing password?How/Where do you plan on storing the users passwords in the first place?
Infinitex0 Posted April 19, 2006 Posted April 19, 2006 Well I must say in these case you need either a .ini(if your in a hurry) or a database(if you have a ton of time on your hands. The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]
Xenobiologist Posted April 21, 2006 Posted April 21, 2006 HI,maybe this is similarly to what you are looking for.http://www.autoitscript.com/forum/index.php?showtopic=25050So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
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