MOD

  • Hi...

    ich hab ja schon folgenden Script fertig


    [autoit]

    #Include <Misc.au3>

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

    $dll = DllOpen("user32.dll")

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

    HotKeySet("#c", "_Close1")
    HotKeySet("#v", "TestFunc1")

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

    TestFunc1()

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

    Func TestFunc1()

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

    While 1

    If _IsPressed("01" , $dll) Or _IsPressed("02", $dll) Then
    $pos = MouseGetPos()
    $x1 = $pos[0] + Random(-6, 6, 1)
    $y1 = $pos[1] + Random(-6, 6, 1)
    MouseMove($x1, $y1, 10)


    EndFunc
    EndIf
    WEnd

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

    Func _Close1()
    Exit
    EndFunc

    [/autoit]

    ist der"MOD" aktiviert lässt er sich mit Windowstaste + c wieder schließen ABER warum lässt er sich nicht mit Windowstaste + v starten?

    Einmal editiert, zuletzt von H43DSH0T (19. März 2010 um 14:32)

  • Ich weiß ja nicht, wie du es geschafft hast, das ding zu starten (EndFunc steht viel zu weit oben)
    aber ich denke mal, du willst es so haben?

    Spoiler anzeigen
    [autoit]

    #include <Misc.au3>

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

    $dll = DllOpen("user32.dll")

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

    HotKeySet("#c", "_Close1")
    HotKeySet("#v", "TestFunc1")

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

    While 1
    Sleep(100)
    WEnd

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

    Func TestFunc1()
    While 1
    If _IsPressed("01", $dll) Or _IsPressed("02", $dll) Then
    $pos = MouseGetPos()
    $x1 = $pos[0] + Random(-6, 6, 1)
    $y1 = $pos[1] + Random(-6, 6, 1)
    MouseMove($x1, $y1, 10)
    EndIf
    WEnd
    EndFunc ;==>TestFunc1

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

    Func _Close1()
    Exit
    EndFunc ;==>_Close1

    [/autoit]
  • Jaaaaaa....

    nah dran aber nein xD

    1. soll man es IMMER wieder an und aus schalten können

    2. sobald man ihn gestartet hat sollte er schon laufen

  • Hallo,

    warum machst du es dann nicht so:

    Spoiler anzeigen
    [autoit]

    #include <Misc.au3>

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

    $dll = DllOpen("user32.dll")

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

    Global $b = True

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

    HotKeySet("#c", "_Close1")
    HotKeySet("#s", "StartStop")
    HotKeySet("#p", "Pause")

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

    While 1
    If $b Then
    If _IsPressed("01", $dll) Or _IsPressed("02", $dll) Then
    $pos = MouseGetPos()
    $x1 = $pos[0] + Random(-6, 6, 1)
    $y1 = $pos[1] + Random(-6, 6, 1)
    MouseMove($x1, $y1, 10)
    EndIf
    EndIf
    WEnd

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

    Func StartStop()
    $b = Not $b
    EndFunc ;==>StartStop

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

    Func Pause()
    $b = False
    EndFunc ;==>Pause

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

    Func _Close1()
    Exit
    EndFunc ;==>_Close1

    [/autoit]

    S Startet bzw. Stopt, P stop (eigentlich unnötig)
    mfg (Aut)Bert