Jump to content

login check DriveGetSerial online


Recommended Posts

; ----------------------------------------------------------------------------
; ----------------------------------------------------------------------------
;
; Author:
;  Malu05 aka. Mads Hagbart Lund <mads@madx.dk>
;
; Script Function:
;  Login Script
;
; Notes:
;
; ----------------------------------------------------------------------------
; ----------------------------------------------------------------------------
;;================================================================================
;;INCLUDES
;;================================================================================
#include <INet.au3>
#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
;;================================================================================
;;VARIABEL DEFINITION
;;================================================================================
$WebFileLoc = "http://www.madx.dk/files/login.php"  ;Put the link to the login file here.
;;================================================================================
;;GUI CREATION
;;================================================================================
$Login = GUICreate("Login",220,100)              ; //Create the login window
$User = GUICtrlCreateInput("Username",10,10)              ; //Create the Username Input
$Pass = GUICtrlCreateInput("Password",10,40,-1,-1,$ES_PASSWORD)       ; //Create the Password Input
$OKbutton = GUICtrlCreateButton("Login",110,70,100)          ; //Create the Login Button
$Exit = GUICtrlCreateButton("Exit",10,70,100)             ; //Create the Exit Button
GUISetState()                      ; //Display the GUI
;;================================================================================
;;LOGIN LOOP
;;================================================================================
While 1                     ; //Initialize loop
    $msg = GUIGetMsg()                  ; //Recive Input
    Select
        Case $msg = $GUI_EVENT_CLOSE or $msg = $Exit            ; //If the Exit or Close button is clicked, close the app.
            MsgBox(0, "Terminate", "Adios")            ; //Say goodbye
            Exit                     ; //Exit the Application
        Case $msg = $OKbutton                 ; //If the Login button is clicked goto the login function
   _login()
    EndSelect
WEnd
;;================================================================================
;;_login()
;;================================================================================
func _login()
$UsernameInput = GUICtrlRead($User)              ; //Get the username from the Input
$PasswordInput = GUICtrlRead($Pass)              ; //Get the password from the Input
if $UsernameInput = "" or $PasswordInput = "" Then            ; //Check if the user forgot to put in username and/or password_
MsgBox(0,"ERROR","Please Enter a Username and Password")          ;    -> Then Print this error
Else
$WEBdata = _INetGetSource($WebFileLoc &'?user=' & $UsernameInput & '&pass=' & $PasswordInput) ; //Get the data from the PHP file

if $WEBdata = "02" Then      ; //Check for Error outputs_
  MsgBox(0,"Error","Unable to Login" & @lf & "Username and or Password was incorrect")  ;->Display error output
ElseIf $WEBdata ="0102" Then 
  MsgBox(0,"Error","Unable to Login" & @lf & "Password was incorrect")    ;->Display error output
Else                      
  msgbox(0,"Welcome","Welcome" & @lf & "data = " & StringTrimRight($WEBdata,2))    ; //Login Sucessfull. Post data.
EndIf
EndIf
EndFunc ;--> _login()

url :

file : http://www.autoitscript.com/forum/index.php?app=core&module=attach&section=attach&attach_id=26120

Link to post
Share on other sites
  • Moderators

Looks,

Welcome to the Autoit forum. ;)

Do you have a question about, or problem with, that code? :)

We are not mindreaders - we need some information in order to help you. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...