Jump to content

Recommended Posts

Posted

hi guy

I just learned autoit so I don't understand how to create a login but check the login key on the web
Please help me
My WEB check key:
https://curllikefb2018.000webhostapp.com/lisenseson.txt
My Gui code

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 373, 200, 1022, 291)
$Input1 = GUICtrlCreateInput("Input1", 8, 48, 353, 21)
$Button1 = GUICtrlCreateButton("Button1", 72, 80, 131, 33, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
       guidelete($Form1)
        Case $GUI_EVENT_CLOSE
            Exit
            Case $button1

guidelete($Form1)
exitloop



    EndSwitch
WEnd



#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 121, 57, 192, 124)
$Label1 = GUICtrlCreateLabel("Hello Work", 16, 16, 89, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

 

Posted
8 minutes ago, Jos said:

What does the posted code have to do with your question?
So better/real details of what you want!

Jos

I want to login by comparing the value to the web if it is correct, it will open form 2 if it is wrong, it will open the wrong message box

image.png.f4b3a3ce405c160d45c419a4e157a333.png

Posted

I am not offering an opinion the web part but if you are just trying to figure out how to open a form after matching a password one approach would be to hide and/or disable until you get a match while allowing the user to exit if they can't do it:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 437, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 128, 128, 97, 25)
$Button2 = GUICtrlCreateButton("Button2", 272, 128, 81, 25)
$Input1 = GUICtrlCreateInput("", 112, 192, 281, 21)
$Input2 = GUICtrlCreateInput("", 112, 224, 281, 21)
GUISetState(@SW_HIDE)
GUISetState(@SW_DISABLE)
#EndRegion ### END Koda GUI section ###

global $pwd=123456
_login()

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

func _login()
    Do
        $value=InputBox("Password Checker","Please enter your password","","*")
        If $value==$pwd Then
            MsgBox(0,'Good stuff', "Password Accepted")
            GUISetState(@SW_SHOW,$Form1)
            GUISetState(@SW_ENABLE,$Form1)
        ElseIf @error = 1 then
            exit
        Else
            MsgBox(0,'Bad stuff', "Password no good")
        EndIf
    Until $value == $pwd
EndFunc

 

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

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