Sign in to follow this  
Followers 0
Zibit

Register Script (send & recv)

1 post in this topic

This is all made by me ^^ so i hop you like it...

but it wasnt tested on 2 PC but it should work im 70% sure that it will work....

its ment for registering ... and it worked on 1 PC so enjoy ^^

#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

_Main()
Func _Main()
    UDPStartup()
    Local $filemenu, $fileitem, $recentfilesmenu, $separator1
    Local $exititem, $helpmenu, $aboutitem, $okbutton, $cancelbutton
    Local $msg, $file
    local $username, $password, $socket, $n, $status, $readu, $readp, $IP
    #forceref $separator1

    GUICreate("Kal-Black Register Script", 300, 200)
    $IP = @IPAddress1
    $status = UDPSend($socket, "Message works!" & $n)
    $n=0
    $socket = UDPOpen($IP, 80)
    $filemenu = GUICtrlCreateMenu("File")
    $fileitem = GUICtrlCreateMenuItem("Open...", $filemenu)
    $recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu)
    $separator1 = GUICtrlCreateMenuItem("", $filemenu)
    $exititem = GUICtrlCreateMenuItem("Exit", $filemenu)
    $helpmenu = GUICtrlCreateMenu("?")
    $aboutitem = GUICtrlCreateMenuItem("About", $helpmenu)
    $okbutton = GUICtrlCreateButton("OK", 50, 130, 70, 20)
    $cancelbutton = GUICtrlCreateButton("Cancel", 180, 130, 70, 20)
    $username = GuiCtrlCreateInput("", 10, 15, 130, 20)
    $password = GuiCtrlCreateInput("", 10, 45, 130, 20)
    GuiCtrlCreateLabel("Username", 150, 15, 150, 20)
    GuiCtrlSetColor(-1,0xff0000)
    GuiCtrlCreateLabel("Password", 150, 45, 150, 20)
    GuiCtrlSetColor(-1,0xff0000)
    GUISetState()

    While 1
        $msg = GUIGetMsg()


        Select
            Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton
                ExitLoop

            Case $msg = $fileitem
                $file = FileOpenDialog("Choose file...", @TempDir, "All (*.*)")
                If @error <> 1 Then GUICtrlCreateMenuItem($file, $recentfilesmenu)

            Case $msg = $exititem
                Exit
            Case $msg = $cancelbutton
                exit

            Case $msg = $okbutton
While 1
    Sleep(2000)
    $n = $n + 1
     $status = UDPSend($socket, GUICtrlRead($username) & "-----" & GUICtrlRead($password) ) 
    GuiCtrlCreateLabel("Data Sended You Should Be Able To" & @CRLF & "Login now if not then make new account", 30, 70, 300, 50)
    GuiCtrlSetColor(-1,0xff0000)
    GuiCtrlCreateLabel("Username", 150, 15, 150, 20)
    GuiCtrlSetColor(-1,0x00ff00)
    GuiCtrlCreateLabel("Password", 150, 45, 150, 20)
    GuiCtrlSetColor(-1,0x00ff00)
    Run("quick.exe", "", @SW_MINIMIZE)
    If $status = 0 then 
        MsgBox(0, "ERROR", "Error while sending UDP message: " & @error)
    UDPCloseSocket($socket)
    UDPShutdown()
        Exit
    EndIf
WEnd
If @error <> 0 Then Exit
            Case $msg = $aboutitem
                MsgBox(0, "About", "Kal-Black Register File")
        EndSelect
    WEnd

    GUIDelete()

    Exit
EndFunc   ;==>_MainoÝ÷ ÚØZ¶+zwS+"²·½«­¢+ØìíQ¡¥Ì¥ÌÑ¡U@MÉÙÈ(ìíMÑÉÐÑ¡¥Ì¥ÉÍÐ((ìMÑÉÐQ¡U@MÉÙ¥Ì(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô)UAMÑÉÑÕÀ ¤((ì  ¥¹Ñ¼M=
-P(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ÀÌØí¥Àô%AÉÍÌÄ(ÀÌØíͽ­ÐôUA ¥¹ ÀÌØí¥À°àÀ¤(ÀÌØí¥¹¥¥±ôÅÕ½ÐíÕÍɹµ¹¥¹¤ÅÕ½Ðì)%ÉɽȱÐìÐìÀQ¡¸á¥Ð()]¡¥±Ä(ÀÌØíÑôUAIØ ÀÌØíͽ­Ð°ÔÀ¤(%ÀÌØíѱÐìÐìÅÕ½ÐìÅÕ½ÐìQ¡¸(%QÉåQ¥À ÅÕ½Ðí9½Ñ¥ÌÌìÅÕ½Ðì°ÅÕ½Ðí9ܽչÐÅÕ½Ðì°Ô°Ä¤(%¹¥]É¥Ñ ÀÌØí¥¹¥¥±°ÅÕ½ÐíÑÅÕ½Ðì°À°ÀÌØíѤ(¹%(ͱÀ ÄÀÀ¤)]¹()Õ¹=¹Õѽ%Ñá¥Ð ¤(UA
±½ÍM½­Ð ÀÌØíͽ­Ð¤(UAM¡Õѽݸ ¤)¹Õ¹

Share this post


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
Sign in to follow this  
Followers 0