Jump to content

Login Help


 Share

Recommended Posts

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

Link to comment
Share on other sites

can you show us your script that you have .... then we can help

8)

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

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

Link to comment
Share on other sites

this can help get you started

#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)

NEWHeader1.png

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

HI,

maybe this is similarly to what you are looking for.

http://www.autoitscript.com/forum/index.php?showtopic=25050

So 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

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