Hotkey Start funktioniert nicht ..

  • Mein Hotkey Start und Hotkey Exit funktioniert nicht ganz, da er es einfach von selber startet und beendet.

    Script :

    Spoiler anzeigen

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

    $Form1_1 = GUICreate("Event Helping Tool", 551, 441, 218, 17)
    $Event1 = GUICtrlCreateButton("v1", 8, 128, 137, 25, $WS_GROUP)
    $Event2 = GUICtrlCreateButton("v4", 8, 304, 137, 25, $WS_GROUP)
    $Event3 = GUICtrlCreateButton("v3", 8, 248, 137, 25, $WS_GROUP)
    $Event4 = GUICtrlCreateButton("v5", 8, 368, 137, 25, $WS_GROUP)
    $Event = GUICtrlCreateButton("v2", 8, 184, 137, 25, $WS_GROUP)
    $Pic1 = GUICtrlCreatePic("Aussehen.jpg", 0, 0, 550, 440, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    GUISetState(@SW_SHOW)

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Event
    sleep (10000)
    send ("{ENTER}")
    sleep (300)
    send ("/image")
    sleep (300)
    send ("{ENTER}")
    sleep (7000)
    send ("{ENTER}")
    sleep (300)
    send ("Guten Tag")
    sleep (300)
    send ("{ENTER}")
    sleep (300)
    send ("Bye")

    MsgBox(64, "Erfolgreich!", "Vorgang erfolgreich abgeschlossen. Drücken sie auf " ok " um das Tool zu beenden.")

    EndSwitch
    WEnd

    Func _Start()

    EndFunc

    Func _Exit()

    EndFunc

    Kann mir da bitte jemand helfen , wo ich nun den Hotkeyset für Start , Stopp und Beenden einfügen soll und wie es aussehen soll? Ich habe schon mehrere Möglichkeiten gehört und es funzt immer nicht.

    Danke im voraus.

    Einmal editiert, zuletzt von White (30. Mai 2011 um 18:18)

  • Es soll ein Hilfetool werden und ich habe es wieder rausgenommen, da es nie etwas gebracht hat. .

    Könntet ihr bitte noch helfen, wie ich nun den anderen Button Befehle zuweise?

    ich habe es nur beim ersten Button hinbekommen und wenn ich weiter mache, dann sieht es so aus, doch er führt den Befehl dann nicht aus, da nichts passiert.

    Skript:

    Spoiler anzeigen


    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

    $Form1_1 = GUICreate("Event Helping Tool", 551, 441, 218, 17)
    $Event1 = GUICtrlCreateButton("v1", 8, 128, 137, 25, $WS_GROUP)
    $Event2 = GUICtrlCreateButton("v4", 8, 304, 137, 25, $WS_GROUP)
    $Event3 = GUICtrlCreateButton("v3", 8, 248, 137, 25, $WS_GROUP)
    $Event4 = GUICtrlCreateButton("v5", 8, 368, 137, 25, $WS_GROUP)
    $Event = GUICtrlCreateButton("v2", 8, 184, 137, 25, $WS_GROUP)
    $Pic1 = GUICtrlCreatePic("Aussehen.jpg", 0, 0, 550, 440, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    GUISetState(@SW_SHOW)

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Event
    sleep (10000)
    send ("{ENTER}")
    sleep (300)
    send ("/image")
    sleep (300)
    send ("{ENTER}")
    sleep (7000)
    send ("{ENTER}")
    sleep (300)
    send ("Guten Tag")
    sleep (300)
    send ("{ENTER}")
    sleep (300)
    send ("Bye")

    MsgBox(64, "Erfolgreich!", "Vorgang erfolgreich abgeschlossen. Drücken sie auf " ok " um das Tool zu beenden.")

    EndSwitch
    WEnd

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Event1
    sleep (10000)
    send ("{ENTER}")
    sleep (300)
    send ("TEST")

    MsgBox(64, "Erfolgreich!", "Du hast es geschafft.")

    EndSwitch
    WEnd

    Func _Start()

    EndFunc

    Func _Exit()

    EndFunc

    Einmal editiert, zuletzt von White (30. Mai 2011 um 18:48)

  • Ich habs jetzt nicht richtig verstanden, aber bestimmt meinst du es so in der Art:

    Spoiler anzeigen
    [autoit]

    HotKeySet ( "{F1}", "_Start1")
    HotKeySet ( "{F2}" , "_Start2")
    HotKeySet ( "{F3}" , "_Exit")

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

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

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

    $Form1_1 = GUICreate("Event Helping Tool", 551, 441, 218, 17)
    $Event1 = GUICtrlCreateButton("v1", 8, 128, 137, 25, $WS_GROUP)
    $Event2 = GUICtrlCreateButton("v4", 8, 304, 137, 25, $WS_GROUP)
    $Event3 = GUICtrlCreateButton("v3", 8, 248, 137, 25, $WS_GROUP)
    $Event4 = GUICtrlCreateButton("v5", 8, 368, 137, 25, $WS_GROUP)
    $Event = GUICtrlCreateButton("v2", 8, 184, 137, 25, $WS_GROUP)
    $Pic1 = GUICtrlCreatePic("Aussehen.jpg", 0, 0, 550, 440, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _Exit()
    Case $Event1
    _Start2()
    Case $Event
    _Start1()
    EndSwitch
    WEnd

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

    Func _Start1()
    sleep (10000)
    send ("{ENTER}")
    sleep (300)
    send ("/image")
    sleep (300)
    send ("{ENTER}")
    sleep (7000)
    send ("{ENTER}")
    sleep (300)
    send ("Guten Tag")
    sleep (300)
    send ("{ENTER}")
    sleep (300)
    send ("Bye")
    MsgBox(64, "Erfolgreich!", "Vorgang erfolgreich abgeschlossen. Drücken sie auf 'ok' um das Tool zu beenden.")
    Exit
    EndFunc

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

    Func _Start2()
    sleep (10000)
    send ("{ENTER}")
    sleep (300)
    send ("TEST")
    MsgBox(64, "Erfolgreich!", "Du hast es geschafft.")
    EndFunc

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

    Func _Exit()
    Exit
    EndFunc

    [/autoit]

    Beim nächsten mal einfach genauer erklären, was welcher Button machen soll und welchen HotKey du dafür setzt...