passwortmanager

  • Hi zusammen
    Ich habe mich hier in diesem forum angemeldet, weil ich gerade an einen passwortmanager arbeite und jezt ein problem aufgetaucht ist.

    Hier der code :

    Spoiler anzeigen
    [autoit]

    #include <GuiConstantsEx.au3>
    #include <Misc.au3>

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

    Opt("MustDeclareVars", 1)

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

    _Main()

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

    Func _Main()
    Local $GUI, $coords[4], $input1, $label2, $bLoop, $text

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

    $GUI = GUICreate("Zugriff Verweigert!!!",630,451,407,267)
    $input1=GuiCtrlCreateInput("",99,122,350,20)
    $label2=GuiCtrlCreateLabel("Wenn du nicht MiluBarakus bist solltest du hier schnell verschwinden.",39,50,193,150)
    $bLoop = 1
    While 1
    $text = GUICtrlRead ($Input1) ;Fragt die eingegebenen Zahlen ab, mit 1 Millisekunde Pause, um den PC nicht zu überlasten
    sleep (1)
    WEnd

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

    GUISetBkColor( 0xff5001, $GUI)

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

    GUISetState()

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

    sleep (10000)
    While $bLoop = 1
    If @error = 1 Then
    MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
    ; They clicked OK, but did they type the right thing?
    winwaitactive ("Zugriff Verweigert!!!")
    If $text <> "test" Then
    winwaitactive ("Zugriff Verweigert!!!")
    MsgBox(4096, "Error", "You typed in the wrong thing - try again!")
    Else
    $bLoop = 0 ; Exit the loop - ExitLoop would have been an alternative too :)
    EndIf
    EndIf
    WEnd

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

    ; Print the success message
    MsgBox(4096,"AutoIt Example", "You typed in the correct word! Congrats.")

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

    While 1
    $coords = WinGetPos($GUI)
    _MouseTrap($coords[0], $coords[1], $coords[0] + $coords[2], $coords[1] + $coords[3])
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    ExitLoop
    Case Else
    ;;;
    EndSwitch
    WEnd
    _MouseTrap()
    Exit
    EndFunc ;==>_Main

    [/autoit]


    leider funktioniert es nicht, auch wenn ich das richtige passwort eingebe, heisst es, es sei falsch. ?(

    könnt ihr mir helfen?


    mfg MiluBarakus

  • Dein Code ist ein ziemliches Wirrwarr.

    Spoiler anzeigen
    [autoit]

    #include <GuiConstantsEx.au3>
    #include <Misc.au3>

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

    $GUI = GUICreate("Zugriff Verweigert!!!", 630, 451, 407, 267)
    $input1 = GUICtrlCreateInput("", 99, 122, 350, 20)
    $label2 = GUICtrlCreateLabel("Wenn du nicht MiluBarakus bist solltest du hier schnell verschwinden.", 39, 50, 193, 50)
    GUISetBkColor(0xff5001, $GUI)

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

    GUISetState()

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

    Sleep(5000)
    While True
    If GUICtrlRead($input1) <> "test" Then
    MsgBox(4096, "Error", "You typed in the wrong thing - try again!")
    Else
    ExitLoop
    EndIf
    Sleep(50)
    WEnd

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

    ; Print the success message
    MsgBox(4096, "AutoIt Example", "You typed in the correct word! Congrats.")

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

    While 1
    $coords = WinGetPos($GUI)
    _MouseTrap($coords[0], $coords[1], $coords[0] + $coords[2], $coords[1] + $coords[3])
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    ExitLoop
    Case Else
    ;;;
    EndSwitch
    WEnd
    _MouseTrap()
    Exit

    [/autoit]
  • Hallo MiluBarakus,

    abgeändertes Skript:

    Spoiler anzeigen
    [autoit]

    #include <GuiConstantsEx.au3>
    #include <Misc.au3>

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

    Opt("MustDeclareVars", 1)

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

    Global $GUI, $coords[4], $input1, $label2, $bLoop, $text, $btnOK, $msg

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

    _Main()

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

    Func _Main()
    Local $input1, $label2, $bLoop, $text, $btnOK, $msg
    $GUI = GUICreate("Zugriff Verweigert!!!", 630, 451, 407, 267)
    GUISetBkColor(0xff5001, $GUI)
    $label2 = GUICtrlCreateLabel("Wenn du nicht MiluBarakus bist solltest du hier schnell verschwinden.", 39, 50, 350, 40)
    $input1 = GUICtrlCreateInput("", 39, 80, 350, 20)
    $btnOK = GUICtrlCreateButton("an&melden", 39, 110, 70)
    $bLoop = 0
    GUISetState()

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

    While $bLoop < 3
    $msg = GUIGetMsg()
    Switch $msg
    case $GUI_EVENT_CLOSE
    Exit
    case $btnOK
    $bLoop += 1
    $text = GUICtrlRead($input1) ;Fragt das eingegebene Password ab
    If $text <> "test" Then
    If $bLoop = 3 Then
    ;WinWaitActive("Zugriff Verweigert!!!")
    MsgBox(4096, "Error", "You typed in the wrong thing for 3 Times =>EXIT!")
    Exit
    Else
    MsgBox(4096, "Error", "You typed in the wrong thing - try again!")
    EndIf
    Else
    _success()
    EndIf
    ;Sleep(10) ist beim Einsatz von GuiGetMsg nicht notwendig
    EndSwitch
    WEnd
    EndFunc ;==>_Main

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

    Func _success()
    Local $coords[4]
    ; Print the success message
    MsgBox(4096, "AutoIt Example", "You typed in the correct word! Congrats.")

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

    While 1
    $coords = WinGetPos($GUI)
    _MouseTrap($coords[0], $coords[1], $coords[0] + $coords[2], $coords[1] + $coords[3])
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    ExitLoop
    Case Else
    ;;;
    EndSwitch
    WEnd
    _MouseTrap()
    Exit
    EndFunc ;==>_success

    [/autoit]

    mfg (Auto)Bert

  • Die codes funktionieren zwar, aber eigentlich hatte ich geplant, das die maus nicht aus dem manager bewegt werden kann wie hier :

    Spoiler anzeigen
    [autoit]

    #include <GuiConstantsEx.au3>
    #include <Misc.au3>

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

    Opt("MustDeclareVars", 1)

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

    _Main()

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

    Func _Main()
    Local $GUI, $coords[4]

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

    $GUI = GUICreate("Mausefalle xD", 392, 323)
    GUISetBkColor( 0xff5001, $GUI)

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

    GUISetState()

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

    While 1
    $coords = WinGetPos($GUI)
    _MouseTrap($coords[0], $coords[1], $coords[0] + $coords[2], $coords[1] + $coords[3])
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    ExitLoop
    Case Else
    ;;;
    EndSwitch
    WEnd
    _MouseTrap()
    Exit
    EndFunc ;==>_Main

    [/autoit]


    Bei dem von blubbstar kann man die maus am anfang noch herausbewegen, und wenn die richtige antwort gegeben wurde nich mehr :whistling:
    wie ist möglich das die maus am anfang schon nich mehr aus der form kann?

  • Hallo MiluBarakus,

    Zitat

    Die codes funktionieren zwar, aber eigentlich hatte ich geplant, das die maus nicht aus dem manager bewegt werden kann wie hier :

    na dann so:

    Spoiler anzeigen
    [autoit]

    #include <GuiConstantsEx.au3>
    #include <Misc.au3>

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

    Opt("MustDeclareVars", 1)

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

    _Main()

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

    Func _Main()
    Local $GUI, $coords[4], $input1, $label2, $bLoop, $text, $btnOK, $msg
    $GUI = GUICreate("Zugriff Verweigert!!!", 630, 451, 407, 267)
    GUISetBkColor(0xff5001, $GUI)
    $label2 = GUICtrlCreateLabel("Wenn du nicht MiluBarakus bist solltest du hier schnell verschwinden.", 39, 50, 350, 40)
    $input1 = GUICtrlCreateInput("", 39, 80, 350, 20)
    $btnOK = GUICtrlCreateButton("an&melden", 39, 110, 70)
    $bLoop = 0
    GUISetState()

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

    While $bLoop < 3
    $coords = WinGetPos($GUI)
    _MouseTrap($coords[0], $coords[1], $coords[0] + $coords[2], $coords[1] + $coords[3])
    $msg = GUIGetMsg()
    Switch $msg
    case $GUI_EVENT_CLOSE
    Exit
    case $btnOK
    $bLoop += 1
    $text = GUICtrlRead($input1) ;Fragt das eingegebene Password ab
    If $text <> "test" Then
    If $bLoop = 3 Then
    ;WinWaitActive("Zugriff Verweigert!!!")
    MsgBox(4096, "Error", "You typed in the wrong thing for 3 Times =>EXIT!")
    ExitLoop
    Else
    MsgBox(4096, "Error", "You typed in the wrong thing - try again!")
    EndIf
    Else
    MsgBox(4096, "AutoIt Example", "You typed in the correct word! Congrats.")
    ExitLoop
    EndIf
    ;Sleep(10) ist beim Einsatz von GuiGetMsg nicht notwendig
    EndSwitch
    _MouseTrap()
    WEnd
    EndFunc ;==>_Main

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


    mfg (Auto)Bert

  • Sry für den doppelpost, aber ich habe noch ne frage:

    ich möchte , dass mein script nicht einfach vom taskmanager beendet werden kann, also habe ich

    [autoit]

    while 1
    Winwaitactive ("Windows Task-Manager")
    Winclose ("Windows Task-Manager")
    wend

    [/autoit]


    nach func _main eingefügt.
    jetzt funktioniert aber der anmelde button nicht mehr ?( .
    wo muss ich das jetzt einsetzen das es funktioniert?

  • [autoit]


    if WinExists("Windows Task-Manager") = true Then
    WinClose("Windows Task-Manager")
    EndIf

    [/autoit]


    Und war:

    Direkt nach

    [autoit]

    While $bLoop < 3

    [/autoit]


    Edit:

    Kleiner Tipp:
    Ich würd die Tastenkombination Alt+Tab auch blockieren, Genauso wie Windows + m und Alt+F4.
    Was bringt sonst, wenn Taskmanager nicht möglich zu öffnen ist, aber die Sperre per Alt+F4 umgänglich ist?

    Einmal editiert, zuletzt von Rubberducky (18. Oktober 2009 um 04:48)

    • Offizieller Beitrag

    Kleiner Tipp:
    Ich würd die Tastenkombination Alt+Tab auch blockieren, Genauso wie Windows + m und Alt+F4.
    Was bringt sonst, wenn Taskmanager nicht möglich zu öffnen ist, aber die Sperre per Alt+F4 umgänglich ist?


    Ehe du mühselig alle Tastenkombinationen mit ALT und WIN unterdrückst, setze einfache einen Hook auf die ALT- und die WIN- Taste.

  • Zitat

    Ehe du mühselig alle Tastenkombinationen mit ALT und WIN unterdrückst, setze einfache einen Hook auf die ALT- und die WIN- Taste.

    Ich habe noch 2 fragen :whistling:
    1. Wie setzt man einen hook? (ich habe es mit hotkeyset versucht, es funzt nicht...)
    2.Kann man irgedwie das Minimieren vom fenster blockieren? , das schliessen kann man ja einfach durch löschen des

    [autoit]

    case $GUI_EVENT_CLOSE
    Exit

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

    verhindern.

  • cool, thx so hatte ich es mir gedacht :thumbup:

    Einmal editiert, zuletzt von MiluBarakus (18. Oktober 2009 um 15:46)

  • Schließbar mit Alt+F4 und Escape :o Umgehbar mit Windows + M.


    wenn du

    [autoit]

    Case $GUI_EVENT_CLOSE
    Exit

    [/autoit]

    rausnimmst gehts nicht mehr mit alt f4, windows taste ist auch geblockt. ich sehe keine möglichkeit es sonst zu beenden!(ausser pc herunterfahren)

  • Spoiler anzeigen
    [autoit]


    #include <GuiConstantsEx.au3>
    #include <Misc.au3>

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

    Opt("MustDeclareVars", 1)

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

    Local $GUI, $coords[4], $input1, $label2, $bLoop, $text, $btnOK, $msg
    $GUI = GUICreate("Zugriff Verweigert!!!", 630, 451, 407, 267)
    GUISetBkColor(0xff5001, $GUI)
    $label2 = GUICtrlCreateLabel("Wenn du nicht MiluBarakus bist solltest du hier schnell verschwinden.", 39, 50, 350, 40)
    $input1 = GUICtrlCreateInput("", 39, 80, 350, 20)
    $btnOK = GUICtrlCreateButton("an&melden", 39, 110, 70)
    $bLoop = 0
    GUISetState()

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

    While $bLoop < 3
    if WinExists("Windows Task-Manager") = true Then
    WinClose("Windows Task-Manager")
    EndIf

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

    if _isPressed(10) = true or _isPressed(11) or _ispressed(12) Then
    ToolTip("Don´t try to kill the Tool!")
    EndIf

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

    $coords = WinGetPos($GUI)
    _MouseTrap($coords[0], $coords[1], $coords[0] + $coords[2], $coords[1] + $coords[3])
    $msg = GUIGetMsg()
    Switch $msg
    case $GUI_EVENT_CLOSE
    MSGBox(1, "Warning", "Don´t try to kill the Tool!")
    case $btnOK
    $bLoop += 1
    $text = GUICtrlRead($input1) ;Fragt das eingegebene Password ab
    If $text <> "test" Then
    If $bLoop = 3 Then
    ;WinWaitActive("Zugriff Verweigert!!!")
    MsgBox(4096, "Error", "You typed in the wrong thing for 3 Times =>EXIT!")
    ExitLoop
    Else
    MsgBox(4096, "Error", "You typed in the wrong thing - try again!")
    shellexecute("www.link.de")
    EndIf
    Else
    MsgBox(4096, "AutoIt Example", "You typed in the correct word! Congrats.")
    ExitLoop
    EndIf
    ;Sleep(10) ist beim Einsatz von GuiGetMsg nicht notwendig
    EndSwitch
    _MouseTrap()
    WEnd

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


    Nun geht keine Tastenkombi mehr außer Windows + M.