Login Helper for SA:MP

  • Guten Abend Community.

    Eines Tages war mal ein Freund bei mir, wir wollten SA:MP zocken und ich startete SAMP. Doch dann wollte sich mein Freund nicht umdrehen, weil
    ich mein Password eingeben musste (Bei SAMP in der Login ChatBox werden die Buchstaben nicht mit ••• verdeckt). Also gab ich mein
    Password so schnell das er sich es nicht merken konnte.

    Doch dann ist mir die Idee gekommen diesen Script zu machen.
    __________________________________________________

    Was macht der Script?

    Der Script speichert das Password was Du in das Inputfeld eingegeben hast.
    Natürlich wird dein Password im Inputfeld mit ••• verdeckt, so dass es keiner sehen kann.

    Wenn Du dann auf "Save" klickst, wird dein Passwort mit einem Hotkey verbunden.
    Das heißt, drückst Du F1 so öffnet sich die Chatbox in SAMP und dein Password wird schnell in
    in die ChatBox "eingefügt" zusätzlich wird auch automatisch Enter gedrückt.


    Wichtig:


    Ihr dürft beim Inputfeld das "/login" vor eurem Password nicht vergessen!


    Kritik und Verbesserungsvorschläge sind erwünscht.


    Sorry wegen Script Anhang. Doch mein Chrome nimmt manchmal keine Zeilenumbrüche vom Code an ._.

    Einmal editiert, zuletzt von cOraXx (23. November 2010 um 21:23)

  • Hallo cOraXx,

    das Programm lässt sich nicht starten, Ausgabe Scite-Console:

    Die beiden funcs bei Case $Button1 müssen ausserhalb der Schleife stehen,

    mfg autoBert

  • Script Updated.

    Hinzugefügt: Icon,Menu,Bild,Checkbox, Script und Rechtschreib verbesserung.

    Spoiler anzeigen
    [autoit]

    ; Script Start

    [/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstants.au3>
    #include <EditConstants.au3>
    #include <StaticConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=C:\Users\Alex\Desktop\Koda GUI's\Login Helper.kxf
    FileInstall ("C:\Users\Alex\Desktop\Vollendete Scripts\Login Helper\files\San Andreas.jpg",@ScriptDir)
    $Form1 = GUICreate("SA:MP Login Helper", 471, 413, 194, 128)
    GUISetBkColor(0xFFFFFF)
    $Picture = GUICtrlCreatePic("C:\Users\Alex\Desktop\Vollendete Scripts\Login Helper\files\San Andreas.jpg", 0, 40, 473, 353)
    $Password = GUICtrlCreateLabel("Your password:", 16, 8, 116, 27)
    GUICtrlSetFont(-1, 11, 400, 0, "@Meiryo")
    $Input1 = GUICtrlCreateInput("YourPassword", 128, 8, 265, 21, $ES_PASSWORD)
    $Checkbox1 = GUICtrlCreateCheckbox("Enable", 400, 8, 65, 25)
    $MenuItem1 = GUICtrlCreateMenu("Menu")
    $About = GUICtrlCreateMenuItem("About", $MenuItem1)
    $Hotkeys = GUICtrlCreateMenuItem("Hotkeys", $MenuItem1)
    $Close = GUICtrlCreateMenuItem("Close", $MenuItem1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    HotKeySet ("{F2}","_pClose")

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    MsgBox (0,"Closing...","You can also press F2 to close this programm." & @CRLF & "The progamm will now close.")
    Exit

    Case $Checkbox1
    If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
    MsgBox (0,"Password enabled","Password and hotkeys are now enabled, you can now connect to a SA:MP server." & @CRLF & "Please have a look at the hotkeys.")
    HotKeySet ("{F1}","_password")
    ElseIf GUICtrlRead($Checkbox1) = $GUI_UNCHECKED Then
    HotKeySet ("{F1}")
    EndIf
    Case $About
    MsgBox (0,"About","This programm will save your password and if you're connected to a SA:MP server and press F1 then the chatbox opens automaticaly and your password will be writen inside. At the end of your password the ENTER button will be pressed automaticaly too." & @CRLF & @CRLF & "Don't forget the /login in the input field." & @CRLF & @CRLF & "And remember, you can't see your own password in the input field." & @CRLF & @CRLF & "Important: You have to write your password every time again into the field if you close this programm." & @CRLF & @CRLF & "Important: You don't have to type in the input field the T button. The T button will be pressed automaticaly before your password.")

    Case $Hotkeys
    MsgBox (0,"Hotkeys","F1 = Opens automaticaly the Chat-Box ingame, writes your password inside and presses ENTER." & @CRLF & @CRLF & "F2 = Closes the programm.")

    Case $Close
    Exit
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _password ()
    Send ("{t}")
    Send (GUICTRLREAD($Input1))
    Send ("{ENTER}")
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _pClose ()
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; Script End

    [/autoit]

    Kritit ist immer erwünscht, bitte sagt mir ob ihr das Bild seht.

  • Der FileInstall steht an der falschen Stelle, er sollte vor GuiCreate aber auf jeden fall noch vor GuiCtrlCreatePic stehen, dann kannst du bei GuiCtrlCreatePic nämlich den Zielpfad vom FileInstall angeben. Im übrigen solltest du @@DesktopDir beim FileInstall mit @Scriptdir tauschen, es mögen wenige wenn einfach ihr Desktop ohne Nachfrage benutzt wird.
    Warum verlinkst du auf eine fremde Seite, so gross kann dein Skript mit Bild ja auch wieder nicht sein, dass du es (evtl. gezipped) als Datei anhängen könntest,

    mfg autoBert

  • Warum verlinkst du auf eine fremde Seite, so gross kann dein Skript mit Bild ja auch wieder nicht sein, dass du es (evtl. gezipped) als Datei anhängen könntest,

    Einer sagte mir, dass manchmal die Datein zu groß sind für einen Anhang. Also
    habe ich es geuploadet.

    //EDIT: FileInstall korrigiert und Datei als Anhang hoch gestellt.

    Einmal editiert, zuletzt von cOraXx (23. November 2010 um 23:05)