Pakete abfangen & auswerten

  • Geht vielleicht nen Quellcode dabei ? denke mal das exe dateien hier von grundaus nicht ausgeführt werden...

    ich zu meinem Teil habe es trotzdem mal getestet -.- die Sounds sind zum Teil nicht vorhanden. und es funzt nur einmal irgentwie... dann muss ich script neustarten kA woran es liegt. bitte um den code ;)

    Einmal editiert, zuletzt von SiLenCa (16. März 2009 um 20:40)

  • argh -.- kopf -> wand :D...bin ja hier im autoit und nicht im dotaforum.. hier kanns jeder selbst compilen -.- sry..! aber iwie komisch das ich den großen fehler nicht bemerkt hab O.o..hab komischerweise immer nur eins getestet xD. aber die sounds gehen bei mir :o

    Spoiler anzeigen
    [autoit]


    ;#####################
    ; INCLUDES
    ;#####################
    #include "misc.au3"
    #include "file.au3"
    ;#####################
    ;INCLUDES ENDE
    ;#####################

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

    ;#####################
    ;VARIABLEN UND DLLs DEFINIEREN
    ;#####################
    Dim $hero
    Dim $herolist
    Dim $heroget
    Dim $count
    Dim $zahl
    $dll = DllOpen("user32.dll")
    $herolistdir = "heros.txt"
    _FileReadtoarray($herolistdir, $herolist)
    $ubound = UBound ($herolist)
    ;#####################
    ;VARIABLEN UND DLL ENDE
    ;#####################

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

    ;#####################
    ;AUF AUSLÖSER WARTEN
    ;#####################
    _wait()
    Func _wait()
    While 1
    If _IsPressed ("0D", $dll) Then
    While _IsPressed ("0D", $dll)
    $pressed = 1
    WEnd
    _input()
    EndIf
    WEnd
    EndFunc
    ;#####################
    ;AUSLÖSER ENDE
    ;#####################

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

    ;#####################
    ;HERO ITEMLISTE
    ;#####################
    Func _held($kaska)
    Do
    $count = $count + 1
    $read = IniRead ("builds.ini", $kaska, "item" & $count, "fertig")
    $endcheck = IniRead ("builds.ini", $kaska, "item" & $count + 1, "fertig")
    If $endcheck = "fertig" Then
    _sound ($read, 0)
    Else
    _sound ($read, 1)
    EndIf
    Until $read = "fertig"
    $read = ""
    _wait()
    EndFunc

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

    ;#####################
    ;HERO ITEMLISTE ENDE
    ;#####################

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

    ;#####################
    ;ITEM Sounds
    ;#####################
    Func _sound($sound, $pause)
    SoundPlay ("sounds\" & $sound & ".wav", $pause)
    EndFunc
    ;#####################
    ;ITEM Sounds Ende
    ;#####################

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

    ;#####################
    ;HERO ERKENNEN
    ;#####################
    Func _heroget()
    For $i = 1 To UBound ($herolist) -1 Step 1
    $zahl = $i
    $string = StringInStr ($herolist[$i], $hero)
    If $string > 0 Then
    _output()
    EndIf
    Next
    $hero = ""
    _wait()
    EndFunc

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

    Func _output()
    $hero = ""
    Switch $zahl
    Case 1
    _held("kunkka")
    Case 2
    _held("windrunner")
    Case 3
    _held("venge")
    Case 4
    _held("zeus")
    Case 5
    _held("enchantress")
    Case 6
    _held("morph")
    Case 7
    _held("rylai")
    Case 8
    _held("sven")
    Case 9
    _held("naga")
    Case 10
    _held("es")
    Case 11
    _held("riki")
    Case 12
    _held("sylla")
    Case 13
    _held("lina")
    Case 14
    _held("yurnero")
    Case 15
    _held("silencer")
    Case 16
    _held("roof")
    Case 17
    _held("engima")
    Case 18
    _held("ezalor")
    Case 19
    _held("ursa")
    Case 20
    _held("ogre")
    Case 21
    _held("tinker")
    Case 22
    _held("chen")
    Case 23
    _held("furion")
    Case 24
    _held("pitlord")
    Case 25
    _held("tiny")
    Case 26
    _held("techie")
    Case 27
    _held("rexxar")
    Case 28
    _held("jakiro")
    Case 29
    _held("alchi")
    Case 30
    _held("potm")
    Case 31
    _held("storm")
    Case 32
    _held("huskar")
    Case 33
    _held("lanaya")
    Case 34
    _held("puck")
    Case 35
    _held("clock")
    Case 36
    _held("luna")
    Case 37
    _held("sniper")
    Case 38
    _held("troll")
    Case 39
    _held("rhasta")
    Case 40
    _held("bristle")
    Case 41
    _held("panda")
    Case 42
    _held("cent")
    Case 43
    _held("gondar")
    Case 44
    _held("dk")
    Case 45
    _held("magina")
    Case 46
    _held("trax")
    Case 47
    _held("omni")
    Case 48
    _held("tb")
    Case 49
    _held("leshrac")
    Case 50
    _held("lich")
    Case 51
    _held("krobelus")
    Case 52
    _held("lion")
    Case 53
    _held("venomancer")
    Case 54
    _held("magnus")
    Case 55
    _held("visage")
    Case 56
    _held("nessaj")
    Case 57
    _held("lycan")
    Case 58
    _held("broodmother")
    Case 59
    _held("mortred")
    Case 60
    _held("medusa")
    Case 61
    _held("balanar")
    Case 62
    _held("leoric")
    Case 63
    _held("doom")
    Case 64
    _held("nerub")
    Case 65
    _held("slardar")
    Case 66
    _held("akasha")
    Case 67
    _held("clinkz")
    Case 68
    _held("void")
    Case 69
    _held("viper")
    Case 70
    _held("razor")
    Case 71
    _held("naix")
    Case 72
    _held("pugna")
    Case 73
    _held("tide")
    Case 74
    _held("bane")
    Case 75
    _held("necrolyte")
    Case 76
    _held("pudge")
    Case 77
    _held("bara")
    Case 78
    _held("weaver")
    Case 79
    _held("nevermore")
    Case 80
    _held("sandking")
    Case 81
    _held("axe")
    Case 82
    _held("bs")
    Case 83
    _held("abbadon")
    Case 84
    _held("spectre")
    Case 85
    _held("witch")
    Case 86
    _held("obsidian")
    Case 87
    _held("warlock")
    Case 88
    _held("geo")
    Case 89
    _held("dazzle")
    Case 90
    _held("pl")
    Case 91
    _held("undying")
    Case 92
    _held("darkseer")
    Case 93
    _held("invoker")
    EndSwitch
    EndFunc
    ;#####################
    ;HERO ERKENNEN ENDE
    ;#####################

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

    ;#####################
    ;KEYLOGGEN
    ;#####################
    Func _input()
    While 1
    If _IsPressed ("0D", $dll) Then
    While _IsPressed ("0D", $dll)
    $pressed= 1
    WEnd
    _heroget()
    EndIf
    If _IsPressed ("08", $dll) Then
    While _IsPressed ("08", $dll)
    $pressed= 1
    WEnd
    _backspace()
    EndIf
    If _IsPressed ("BD", $dll) Then
    While _IsPressed ("BD", $dll)
    $pressed= 1
    WEnd
    _buchstabe("-")
    EndIf
    If _IsPressed ("41", $dll) Then
    While _IsPressed ("41", $dll)
    $pressed= 1
    WEnd
    _buchstabe("a")
    EndIf
    If _IsPressed ("42", $dll) Then
    While _IsPressed ("42", $dll)
    $pressed= 1
    WEnd
    _buchstabe("b")
    EndIf
    If _IsPressed ("43", $dll) Then
    While _IsPressed ("43", $dll)
    $pressed= 1
    WEnd
    _buchstabe("c")
    EndIf
    If _IsPressed ("44", $dll) Then
    While _IsPressed ("44", $dll)
    $pressed= 1
    WEnd
    _buchstabe("d")
    EndIf
    If _IsPressed ("45", $dll) Then
    While _IsPressed ("45", $dll)
    $pressed= 1
    WEnd
    _buchstabe("e")
    EndIf
    If _IsPressed ("46", $dll) Then
    While _IsPressed ("46", $dll)
    $pressed= 1
    WEnd
    _buchstabe("f")
    EndIf
    If _IsPressed ("47", $dll) Then
    While _IsPressed ("47", $dll)
    $pressed= 1
    WEnd
    _buchstabe("g")
    EndIf
    If _IsPressed ("48", $dll) Then
    While _IsPressed ("48", $dll)
    $pressed= 1
    WEnd
    _buchstabe("h")
    EndIf
    If _IsPressed ("49", $dll) Then
    While _IsPressed ("49", $dll)
    $pressed= 1
    WEnd
    _buchstabe("i")
    EndIf
    If _IsPressed ("4A", $dll) Then
    While _IsPressed ("4A", $dll)
    $pressed= 1
    WEnd
    _buchstabe("j")
    EndIf
    If _IsPressed ("4B", $dll) Then
    While _IsPressed ("4B", $dll)
    $pressed= 1
    WEnd
    _buchstabe("k")
    EndIf
    If _IsPressed ("4C", $dll) Then
    While _IsPressed ("4C", $dll)
    $pressed= 1
    WEnd
    _buchstabe("l")
    EndIf
    If _IsPressed ("4D", $dll) Then
    While _IsPressed ("4D", $dll)
    $pressed= 1
    WEnd
    _buchstabe("m")
    EndIf
    If _IsPressed ("4E", $dll) Then
    While _IsPressed ("4E", $dll)
    $pressed= 1
    WEnd
    _buchstabe("n")
    EndIf
    If _IsPressed ("4F", $dll) Then
    While _IsPressed ("4F", $dll)
    $pressed= 1
    WEnd
    _buchstabe("o")
    EndIf
    If _IsPressed ("50", $dll) Then
    While _IsPressed ("50", $dll)
    $pressed= 1
    WEnd
    _buchstabe("p")
    EndIf
    If _IsPressed ("51", $dll) Then
    While _IsPressed ("51", $dll)
    $pressed= 1
    WEnd
    _buchstabe("q")
    EndIf
    If _IsPressed ("52", $dll) Then
    While _IsPressed ("52", $dll)
    $pressed= 1
    WEnd
    _buchstabe("r")
    EndIf
    If _IsPressed ("53", $dll) Then
    While _IsPressed ("53", $dll)
    $pressed= 1
    WEnd
    _buchstabe("s")
    EndIf
    If _IsPressed ("54", $dll) Then
    While _IsPressed ("54", $dll)
    $pressed= 1
    WEnd
    _buchstabe("t")
    EndIf
    If _IsPressed ("55", $dll) Then
    While _IsPressed ("55", $dll)
    $pressed= 1
    WEnd
    _buchstabe("u")
    EndIf
    If _IsPressed ("56", $dll) Then
    While _IsPressed ("56", $dll)
    $pressed= 1
    WEnd
    _buchstabe("v")
    EndIf
    If _IsPressed ("57", $dll) Then
    While _IsPressed ("57", $dll)
    $pressed= 1
    WEnd
    _buchstabe("w")
    EndIf
    If _IsPressed ("58", $dll) Then
    While _IsPressed ("58", $dll)
    $pressed= 1
    WEnd
    _buchstabe("x")
    EndIf
    If _IsPressed ("59", $dll) Then
    While _IsPressed ("59", $dll)
    $pressed= 1
    WEnd
    _buchstabe("y")
    EndIf
    If _IsPressed ("5A", $dll) Then
    While _IsPressed ("5A", $dll)
    $pressed= 1
    WEnd
    _buchstabe("z")
    EndIf
    WEnd
    EndFunc
    ;#####################
    ;KEYLOG ENDE
    ;#####################

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

    ;#####################
    ;buchstabeN UDFs
    ;#####################

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

    Func _buchstabe($buchstabe)
    $hero = $hero & $buchstabe
    EndFunc

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

    Func _backspace()
    $hero = StringTrimRight ($hero, 1)
    EndFunc

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

    ;#####################
    ;buchstabeN ENDE
    ;#####################

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]
  • Die sounds gehen zum großteil bei mir auch... nur bei z.b. "Basher" und einigen anderen ist nichts zu hören.
    danke für den Code

  • fehler gefunden..hatte in fruityloops beim exporten falsche einstellung..werd ich alles morgen fixen, bin grad zu müde^^

  • Sooo.. hab das problem glaube gelöst ;) also

    [autoit]

    Func _held($kaska)
    Do
    $count = $count + 1
    $read = IniRead ("builds.ini", $kaska, "item" & $count, "fertig")
    $endcheck = IniRead ("builds.ini", $kaska, "item" & $count + 1, "fertig")
    If $endcheck = "fertig" Then
    _sound ($read, 0)
    Else
    _sound ($read, 1)
    EndIf
    Until $read = "fertig"
    $read = ""
    _wait()
    EndFunc

    [/autoit]

    Dort muss der $count wieder auf 0 gesetzt werden.

    [autoit]

    Func _held($kaska)
    Do
    $count = $count + 1
    $read = IniRead ("builds.ini", $kaska, "item" & $count, "fertig")
    $endcheck = IniRead ("builds.ini", $kaska, "item" & $count + 1, "fertig")
    If $endcheck = "fertig" Then
    _sound ($read, 0)
    Else
    _sound ($read, 1)
    EndIf
    Until $read = "fertig"
    $read = ""
    $count = 0
    _wait()
    EndFunc

    [/autoit]
  • okay-> neue version!
    changes:
    -sounds berichtigt
    -sounds ins mp3 format umgewandelt, sind somit kleiner
    -bug fixed (riesen dank an SiLenCa !!)

    ---DOWNLOAD---

    Spoiler anzeigen
    [autoit]


    ;#####################
    ; INCLUDES
    ;#####################
    #include "misc.au3"
    #include "file.au3"
    ;#####################
    ;INCLUDES ENDE
    ;#####################

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

    ;#####################
    ;VARIABLEN UND DLLs DEFINIEREN
    ;#####################
    Dim $hero
    Dim $herolist
    Dim $heroget
    Dim $count
    Dim $zahl
    $dll = DllOpen("user32.dll")
    $herolistdir = "heros.txt"
    _FileReadtoarray($herolistdir, $herolist)
    $ubound = UBound ($herolist)
    ;#####################
    ;VARIABLEN UND DLL ENDE
    ;#####################

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

    ;#####################
    ;AUF AUSLÖSER WARTEN
    ;#####################
    _wait()
    Func _wait()
    While 1
    If _IsPressed ("0D", $dll) Then
    While _IsPressed ("0D", $dll)
    $pressed = 1
    WEnd
    _input()
    EndIf
    WEnd
    EndFunc
    ;#####################
    ;AUSLÖSER ENDE
    ;#####################

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

    ;#####################
    ;HERO ITEMLISTE
    ;#####################
    Func _held($kaska)
    Do
    $count = $count + 1
    $read = IniRead ("builds.ini", $kaska, "item" & $count, "fertig")
    $endcheck = IniRead ("builds.ini", $kaska, "item" & $count + 1, "fertig")
    If $endcheck = "fertig" Then
    _sound ($read, 0)
    Else
    _sound ($read, 1)
    EndIf
    Until $read = "fertig"
    $read = ""
    $count = 0
    _wait()
    EndFunc

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

    ;#####################
    ;HERO ITEMLISTE ENDE
    ;#####################

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

    ;#####################
    ;ITEM Sounds
    ;#####################
    Func _sound($sound, $pause)
    SoundPlay ("sounds\" & $sound & ".mp3", $pause)
    EndFunc
    ;#####################
    ;ITEM Sounds Ende
    ;#####################

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

    ;#####################
    ;HERO ERKENNEN
    ;#####################
    Func _heroget()
    For $i = 1 To UBound ($herolist) -1 Step 1
    $zahl = $i
    $string = StringInStr ($herolist[$i], $hero)
    If $string > 0 Then
    _output()
    EndIf
    Next
    $hero = ""
    _wait()
    EndFunc

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

    Func _output()
    $hero = ""
    Switch $zahl
    Case 1
    _held("kunkka")
    Case 2
    _held("windrunner")
    Case 3
    _held("venge")
    Case 4
    _held("zeus")
    Case 5
    _held("enchantress")
    Case 6
    _held("morph")
    Case 7
    _held("rylai")
    Case 8
    _held("sven")
    Case 9
    _held("naga")
    Case 10
    _held("es")
    Case 11
    _held("riki")
    Case 12
    _held("sylla")
    Case 13
    _held("lina")
    Case 14
    _held("yurnero")
    Case 15
    _held("silencer")
    Case 16
    _held("roof")
    Case 17
    _held("engima")
    Case 18
    _held("ezalor")
    Case 19
    _held("ursa")
    Case 20
    _held("ogre")
    Case 21
    _held("tinker")
    Case 22
    _held("chen")
    Case 23
    _held("furion")
    Case 24
    _held("pitlord")
    Case 25
    _held("tiny")
    Case 26
    _held("techie")
    Case 27
    _held("rexxar")
    Case 28
    _held("jakiro")
    Case 29
    _held("alchi")
    Case 30
    _held("potm")
    Case 31
    _held("storm")
    Case 32
    _held("huskar")
    Case 33
    _held("lanaya")
    Case 34
    _held("puck")
    Case 35
    _held("clock")
    Case 36
    _held("luna")
    Case 37
    _held("sniper")
    Case 38
    _held("troll")
    Case 39
    _held("rhasta")
    Case 40
    _held("bristle")
    Case 41
    _held("panda")
    Case 42
    _held("cent")
    Case 43
    _held("gondar")
    Case 44
    _held("dk")
    Case 45
    _held("magina")
    Case 46
    _held("trax")
    Case 47
    _held("omni")
    Case 48
    _held("tb")
    Case 49
    _held("leshrac")
    Case 50
    _held("lich")
    Case 51
    _held("krobelus")
    Case 52
    _held("lion")
    Case 53
    _held("venomancer")
    Case 54
    _held("magnus")
    Case 55
    _held("visage")
    Case 56
    _held("nessaj")
    Case 57
    _held("lycan")
    Case 58
    _held("broodmother")
    Case 59
    _held("mortred")
    Case 60
    _held("medusa")
    Case 61
    _held("balanar")
    Case 62
    _held("leoric")
    Case 63
    _held("doom")
    Case 64
    _held("nerub")
    Case 65
    _held("slardar")
    Case 66
    _held("akasha")
    Case 67
    _held("clinkz")
    Case 68
    _held("void")
    Case 69
    _held("viper")
    Case 70
    _held("razor")
    Case 71
    _held("naix")
    Case 72
    _held("pugna")
    Case 73
    _held("tide")
    Case 74
    _held("bane")
    Case 75
    _held("necrolyte")
    Case 76
    _held("pudge")
    Case 77
    _held("bara")
    Case 78
    _held("weaver")
    Case 79
    _held("nevermore")
    Case 80
    _held("sandking")
    Case 81
    _held("axe")
    Case 82
    _held("bs")
    Case 83
    _held("abbadon")
    Case 84
    _held("spectre")
    Case 85
    _held("witch")
    Case 86
    _held("obsidian")
    Case 87
    _held("warlock")
    Case 88
    _held("geo")
    Case 89
    _held("dazzle")
    Case 90
    _held("pl")
    Case 91
    _held("undying")
    Case 92
    _held("darkseer")
    Case 93
    _held("invoker")
    EndSwitch
    EndFunc
    ;#####################
    ;HERO ERKENNEN ENDE
    ;#####################

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

    ;#####################
    ;KEYLOGGEN
    ;#####################
    Func _input()
    While 1
    If _IsPressed ("0D", $dll) Then
    While _IsPressed ("0D", $dll)
    $pressed= 1
    WEnd
    _heroget()
    EndIf
    If _IsPressed ("08", $dll) Then
    While _IsPressed ("08", $dll)
    $pressed= 1
    WEnd
    _backspace()
    EndIf
    If _IsPressed ("BD", $dll) Then
    While _IsPressed ("BD", $dll)
    $pressed= 1
    WEnd
    _buchstabe("-")
    EndIf
    If _IsPressed ("41", $dll) Then
    While _IsPressed ("41", $dll)
    $pressed= 1
    WEnd
    _buchstabe("a")
    EndIf
    If _IsPressed ("42", $dll) Then
    While _IsPressed ("42", $dll)
    $pressed= 1
    WEnd
    _buchstabe("b")
    EndIf
    If _IsPressed ("43", $dll) Then
    While _IsPressed ("43", $dll)
    $pressed= 1
    WEnd
    _buchstabe("c")
    EndIf
    If _IsPressed ("44", $dll) Then
    While _IsPressed ("44", $dll)
    $pressed= 1
    WEnd
    _buchstabe("d")
    EndIf
    If _IsPressed ("45", $dll) Then
    While _IsPressed ("45", $dll)
    $pressed= 1
    WEnd
    _buchstabe("e")
    EndIf
    If _IsPressed ("46", $dll) Then
    While _IsPressed ("46", $dll)
    $pressed= 1
    WEnd
    _buchstabe("f")
    EndIf
    If _IsPressed ("47", $dll) Then
    While _IsPressed ("47", $dll)
    $pressed= 1
    WEnd
    _buchstabe("g")
    EndIf
    If _IsPressed ("48", $dll) Then
    While _IsPressed ("48", $dll)
    $pressed= 1
    WEnd
    _buchstabe("h")
    EndIf
    If _IsPressed ("49", $dll) Then
    While _IsPressed ("49", $dll)
    $pressed= 1
    WEnd
    _buchstabe("i")
    EndIf
    If _IsPressed ("4A", $dll) Then
    While _IsPressed ("4A", $dll)
    $pressed= 1
    WEnd
    _buchstabe("j")
    EndIf
    If _IsPressed ("4B", $dll) Then
    While _IsPressed ("4B", $dll)
    $pressed= 1
    WEnd
    _buchstabe("k")
    EndIf
    If _IsPressed ("4C", $dll) Then
    While _IsPressed ("4C", $dll)
    $pressed= 1
    WEnd
    _buchstabe("l")
    EndIf
    If _IsPressed ("4D", $dll) Then
    While _IsPressed ("4D", $dll)
    $pressed= 1
    WEnd
    _buchstabe("m")
    EndIf
    If _IsPressed ("4E", $dll) Then
    While _IsPressed ("4E", $dll)
    $pressed= 1
    WEnd
    _buchstabe("n")
    EndIf
    If _IsPressed ("4F", $dll) Then
    While _IsPressed ("4F", $dll)
    $pressed= 1
    WEnd
    _buchstabe("o")
    EndIf
    If _IsPressed ("50", $dll) Then
    While _IsPressed ("50", $dll)
    $pressed= 1
    WEnd
    _buchstabe("p")
    EndIf
    If _IsPressed ("51", $dll) Then
    While _IsPressed ("51", $dll)
    $pressed= 1
    WEnd
    _buchstabe("q")
    EndIf
    If _IsPressed ("52", $dll) Then
    While _IsPressed ("52", $dll)
    $pressed= 1
    WEnd
    _buchstabe("r")
    EndIf
    If _IsPressed ("53", $dll) Then
    While _IsPressed ("53", $dll)
    $pressed= 1
    WEnd
    _buchstabe("s")
    EndIf
    If _IsPressed ("54", $dll) Then
    While _IsPressed ("54", $dll)
    $pressed= 1
    WEnd
    _buchstabe("t")
    EndIf
    If _IsPressed ("55", $dll) Then
    While _IsPressed ("55", $dll)
    $pressed= 1
    WEnd
    _buchstabe("u")
    EndIf
    If _IsPressed ("56", $dll) Then
    While _IsPressed ("56", $dll)
    $pressed= 1
    WEnd
    _buchstabe("v")
    EndIf
    If _IsPressed ("57", $dll) Then
    While _IsPressed ("57", $dll)
    $pressed= 1
    WEnd
    _buchstabe("w")
    EndIf
    If _IsPressed ("58", $dll) Then
    While _IsPressed ("58", $dll)
    $pressed= 1
    WEnd
    _buchstabe("x")
    EndIf
    If _IsPressed ("59", $dll) Then
    While _IsPressed ("59", $dll)
    $pressed= 1
    WEnd
    _buchstabe("y")
    EndIf
    If _IsPressed ("5A", $dll) Then
    While _IsPressed ("5A", $dll)
    $pressed= 1
    WEnd
    _buchstabe("z")
    EndIf
    WEnd
    EndFunc
    ;#####################
    ;KEYLOG ENDE
    ;#####################

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

    ;#####################
    ;buchstabeN UDFs
    ;#####################

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

    Func _buchstabe($buchstabe)
    $hero = $hero & $buchstabe
    EndFunc

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

    Func _backspace()
    $hero = StringTrimRight ($hero, 1)
    EndFunc

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

    ;#####################
    ;buchstabeN ENDE
    ;#####################

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

    Einmal editiert, zuletzt von unaimed (18. März 2009 um 14:59)

  • Hallo,

    feine Idee, das mit dem vorlesen^^

    Allerdings habe ich noch einige Vorschläge:
    Wenn du die Builds.ini so

    Spoiler anzeigen

    [StealthAssassinRikimaru]
    item1=bos
    item2=wraith
    item3=pt
    item4=diffu
    item5=manta
    item6=bfly

    [SlithereenGuardSlardar]
    item1=bos
    item2=bracer
    item3=pt
    item4=hyper
    item5=assault
    item6=satanic
    item7=buri


    abspeicherst hast du die heros.txt gespart, und dann dieses

    Spoiler anzeigen
    [autoit]

    #include <Misc.au3>
    #include <File.au3>
    #include <array.au3>

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

    $bst = ""
    $hero = ""
    $count = 0
    Dim $herolist
    $herolist=IniReadsectionnames("builds.ini")

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

    While 1
    $key = _Taste()
    If $key <> "" Then ;buchstabe a-z
    $hero = $hero & $key
    EndIf
    If _IsPressed ("08") Then ;backspace
    While _IsPressed ("08")
    $pressed= 1
    WEnd
    $hero = StringTrimRight ($hero, 1)
    EndIf

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

    If _IsPressed("0D") Then ;enter
    ;MsgBox(0, $hero, "ENTER")
    $num = _ArraySearch($herolist, $hero, 0, UBound($herolist), 0, 1)
    If $num<>-1 then
    ;MsgBox(0, "herolist", $herolist[$num])
    _held($herolist[$num])
    endif
    $hero=""
    EndIf
    WEnd

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

    Func _Taste()
    $pressed = 0
    For $buchstabe = 65 To 91
    If _IsPressed(Hex($buchstabe)) Then
    While _IsPressed (Hex($buchstabe))
    $pressed= 1
    WEnd
    ExitLoop
    EndIf
    Next
    If $pressed = 1 Then
    Return Chr($buchstabe)
    Else
    Return ""
    EndIf
    EndFunc ;==>_Taste

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

    Func _held($kaska)
    Do
    $count = $count + 1
    $read = IniRead("builds.ini", $kaska, "item" & $count, "fertig")
    $endcheck = IniRead("builds.ini", $kaska, "item" & $count + 1, "fertig")
    If $endcheck = "fertig" Then
    _sound($read, 0)
    Else
    _sound($read, 1)
    EndIf
    Until $read = "fertig"
    $read = ""
    $count = 0
    EndFunc ;==>_held

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

    Func _sound($sound, $pause)
    SoundPlay("sounds\" & $sound & ".mp3", $pause)
    EndFunc ;==>_sound

    [/autoit]

    Script nutzt, funktioniert es auch.

    Andy

  • //edit: ok, inzwischen liest er immerhin schon vor, aber diese fehlermeldungen kommen trotzdem O.o..und die sounds sind alle am anfang leicht abgehackt..mysterium -.-


    andy, ich bekomm immer nen fehler wenn ich nen heronamen eingebe :o!!

    ich hab übrigens noch nie so krass gemerkt was die erfahrung fürn unterschied macht. das script war anfangs 15kb groß..alles was ich innerhalb von mehreren tagen geschafft hab, war auf 9kb zu reduzieren..und andy kommt nach einem tag mit 2kb O.o und etlichen vorschlägen xD

    2 Mal editiert, zuletzt von unaimed (18. März 2009 um 20:09)

  • inzwischen wars ne lange zeit ruhig ums projekt..doch ich bin bäck =)

    Mit neuen Funtkionen und GUI!

    ACHTUNG: Mouselock Funktion ist noch NICHT aktiv, nur schonmal ins GUI/INI eingebaut.

    Solltet ihr irgendwelche Fehler oder Vorschläge usw. haben einfach melden..!

    Edit: hab grad selbst gemerkt das die Hotkeys nicht so funktionieren, wie sie sollten xD..weiß aber selbst nicht genau wann was macken hat -.-

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>
    #include <Constants.au3>
    ;---------------------
    #include <Misc.au3>
    #include <File.au3>
    #include <array.au3>
    ;---------------------
    #NoTrayIcon

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

    $bst = ""
    $hero = ""
    $count = 0
    $wc3an = 0
    $pinghotkey = ""
    $refreshhotkey = ""
    $hotkey_ping = ""
    $hotkey_refresh = ""
    $war3buttonhidden = 0
    $lcbuttonhidden = 0
    Dim $herolist
    $herolist=IniReadsectionnames("builds.ini")

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

    ;Pinghotkey finden
    Func _hotkeys()
    HotKeySet ($hotkey_ping)
    HotKeySet ($hotkey_refresh)
    $pinghotkeystring = IniRead ("config.ini", "bla", "pinghotkey", "Pinghotkey_error!")
    $pinghotkeystrg = StringInStr ($pinghotkeystring, "STRG")
    If $pinghotkeystrg <> 0 Then
    $hotkey_ping = $hotkey_ping & "^"
    EndIf
    $pinghotkeyalt = StringInStr ($pinghotkeystring, "ALT")
    If $pinghotkeyalt <> 0 Then
    $hotkey_ping = $hotkey_ping & "!"
    EndIf
    $pinghotkeyshift = StringInStr ($pinghotkeystring, "SHIFT")
    If $pinghotkeyshift <> 0 Then
    $hotkey_ping = $hotkey_ping & "+"
    EndIf
    $count_ping = StringLen ($pinghotkeystring)
    $hotkey_trimmed = StringTrimLeft ($pinghotkeystring, $count_ping -1)
    $hotkey_ping = $hotkey_ping & $hotkey_trimmed
    ;Pinghotkey Ende

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

    ;refreshhotkey
    $refreshhotkeystring = IniRead ("config.ini", "bla", "refreshhotkey", "refreshhotkey_error!")
    $refreshhotkeystrg = StringInStr ($refreshhotkeystring, "STRG")
    If $refreshhotkeystrg <> 0 Then
    $hotkey_refresh = $hotkey_refresh & "^"
    EndIf
    $refreshhotkeyalt = StringInStr ($refreshhotkeystring, "ALT")
    If $refreshhotkeyalt <> 0 Then
    $hotkey_refresh = $hotkey_refresh & "!"
    EndIf
    $refreshhotkeyshift = StringInStr ($refreshhotkeystring, "SHIFT")
    If $refreshhotkeyshift <> 0 Then
    $hotkey_refresh = $hotkey_refresh & "+"
    EndIf
    $count_refresh = StringLen ($refreshhotkeystring)
    $hotkey_trimmed = StringTrimLeft ($refreshhotkeystring, $count_refresh -1)
    $hotkey_refresh = $hotkey_refresh & $hotkey_trimmed
    HotKeySet ($hotkey_ping, "_ping")
    HotKeySet ($hotkey_refresh, "_refresh")
    ;refreshhotkey ende
    EndFunc;==> _hotkey

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

    AutoItSetOption ("TrayIconHide", 1)
    Opt("TrayOnEventMode",1)
    Opt("TrayMenuMode",1)
    $first = IniRead ("config.ini", "bla", "first", "blub")

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

    Func _ping()
    While _IsPressed ("12")
    $ichwarte=1
    WEnd
    Send ("{/}pingclients{enter}")
    EndFunc;==>_ping

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

    Func _refresh()
    While _IsPressed ("12")
    $ichwarte=1
    WEnd
    Send ("{/}refreshbnet{enter}")
    EndFunc;==>_refresh

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

    ;Firstruncheck
    If $first = 1 Then
    $wc3path = RegRead ("HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III\", "ProgramX")
    IniWrite ("config.ini", "bla", "first", 0)
    IniWrite ("config.ini", "bla", "wc3path", $wc3path)
    EndIf
    ;check ende

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

    $readwc3path = IniRead ("config.ini", "bla", "wc3path", "error!")
    $readlcpath = IniRead ("config.ini", "bla", "lcpath", "error0!")

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

    ;PINGGUI
    $pinggui = GUICreate ("Hotkey", 200, 100, 300, 100)
    $pingstrg = GUICtrlCreateCheckbox ("STRG", 10, 10)
    $pingalt = GUICtrlCreateCheckbox ("ALT", 10, 30)
    $pingshift = GUICtrlCreateCheckbox ("SHIFT", 10, 50)
    $indtaste = GUICtrlCreateInput ("", 130, 30)
    $pingund = GUICtrlCreateLabel ("UND", 90, 35)
    $pingback = GUICtrlCreateButton ("OK!", 76, 70, 50, 20)
    ;PINGGUI ENDE

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

    ;REFRESHGUI
    $REFRESHgui = GUICreate ("Hotkey", 200, 100, 300, 100)
    $REFRESHstrg = GUICtrlCreateCheckbox ("STRG", 10, 10)
    $REFRESHalt = GUICtrlCreateCheckbox ("ALT", 10, 30)
    $REFRESHshift = GUICtrlCreateCheckbox ("SHIFT", 10, 50)
    $indytaste = GUICtrlCreateInput ("", 130, 30)
    $REFRESHund = GUICtrlCreateLabel ("UND", 90, 35)
    $REFRESHback = GUICtrlCreateButton ("OK!", 76, 70, 50, 20)
    ;REFRESHGUI ENDE

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

    ;OptionenGUI
    ;Paths lesen
    $optwc3realpath = IniRead ("config.ini", "bla", "wc3path", "blub")
    $optlcrealpath = IniRead ("config.ini", "bla", "lcpath", "bla")
    ;paths ende
    $optionenGUI = GUICreate("Optionen", 400, 200, 303, 219)
    $optionenBack = GUICtrlCreateButton("Zurück", 155, 170, 90, 22, 0)
    $optheroitems = GUICtrlCreateCheckbox ("Heroitemreader", 10, 9)
    $optmouselock = GUICtrlCreateCheckbox ("Mouselock aktivieren", 10, 29)
    $optlcpathwahl = GUICtrlCreateButton ("Pfad ändern", 330, 95)
    $optlcpathshow = GUICtrlCreatelabel ("LC Pfad: " & $optlcrealpath, 10, 100, 300, 13)
    $optwc3pathwahl = GUICtrlCreateButton ("Pfad ändern", 330, 135)
    $optwc3pathshow = GUICtrlCreatelabel ("WC3 Pfad: " & $optwc3realpath, 10, 140, 300, 13)
    $optrefreshhotkey = GUICtrlCreateInput (Iniread ("config.ini", "bla", "refreshhotkey", "Error!"), 100, 50, 50, 20)
    $optrefreshlabel = GUICtrlCreateLabel ("Refreshhotkey: ", 10, 55)
    $optrefreshhotkeyset = GUICtrlCreateButton ("Hotkey ändern!", 150, 50, 80, 20)
    $optpinghotkey = GUICtrlCreateInput (Iniread("config.ini", "bla", "pinghotkey", "Error!"), 100, 70, 50, 20)
    $optpinglabel = GUICtrlCreateLabel ("Pinghotkey: ", 10, 72)
    $optpinghotkeyset = GUICtrlCreateButton ("Hotkey ändern!", 150, 71, 80, 20)
    $ischecked_hero = IniRead ("config.ini", "bla", "hero", "ischecked_hero_error")
    $ischecked_mouse = IniRead ("config.ini", "bla", "mouselock", "ischecked_mouse_error")
    If $ischecked_hero = 1 Then
    GUICtrlSetState ($optheroitems, $GUI_CHECKED)
    EndIf
    If $ischecked_mouse = 1 Then
    GUICtrlSetState ($optmouselock, $GUI_CHECKED)
    EndIf
    ;OptionenGUI ende

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

    ;Aboutgui
    $aboutgui = GUICreate ("About", 100, 200, 300, 10)
    $about = GUICtrlCreateLabel (" By Atu" & @CRLF & @CRLF & " (C) 2009", 20, 10)
    $aboutback = GUICtrlCreateButton ("Zurück", 0, 175, 100, 25)
    ;aboutgui ende

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

    ;hauptmenuGUI
    $hauptmenu = GUICreate("By Atu", 100, 200, 300, 10)
    $Exit = GUICtrlCreateButton ("Exit", 0, 125, 100, 25)
    $about = GUICtrlCreateButton ("About", 0, 100, 100, 25)
    $tray = GUICtrlCreateButton ("Tray", 0, 75, 100, 25)
    $optionen = GUICtrlCreateButton ("Optionen", 0, 50, 100, 25)
    $runwc3 = GUICtrlCreateButton ("WCIII starten", 0, 25, 100, 25)
    $runlc = GUICtrlCreateButton ("LC starten", 0, 0, 100, 25)
    GUISetState(@SW_SHOW, $hauptmenu)
    ;hauptmenu ENDE

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

    Func _saveall()
    _hotkeys()
    $heroitemscheck = GUICtrlRead ($optheroitems)
    If $heroitemscheck = 1 Then
    IniWrite (@ScriptDir & "\config.ini", "bla", "hero", 1)
    Else
    IniWrite (@ScriptDir & "\config.ini", "bla", "hero", 0)
    EndIf
    $mouselockcheck = GUICtrlRead ($optmouselock)
    If $mouselockcheck = 1 Then
    IniWrite (@ScriptDir & "\config.ini", "bla", "mouselock", 1)
    Else
    IniWrite (@ScriptDir & "\config.ini", "bla", "mouselock", 0)
    EndIf
    $dawiodh = IniWrite (@ScriptDir & "\config.ini", "bla", "wc3path", $optwc3realpath)
    $asddasd = IniWrite (@ScriptDir & "\config.ini", "bla", "lcpath", $optlcrealpath)
    EndFunc;===> _saveall

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

    Func _refreshgui()
    While 1
    $refreshmsg = GUIGetMsg()
    Switch $refreshmsg
    Case $GUI_EVENT_CLOSE
    GUISetState (@SW_HIDE, $refreshgui)
    GUISetState (@SW_SHOW, $optionengui)
    _optionen()
    Case $refreshback
    $ischecked_strg = GUICtrlRead ($refreshstrg)
    $ischecked_alt = GUICtrlRead ($refreshalt)
    $ischecked_shift = GUICtrlRead ($refreshshift)
    If $ischecked_strg = 1 Then
    $refreshHOTKEY = $refreshHOTKEY & "STRG+"
    EndIf
    If $ischecked_alt = 1 Then
    $refreshHOTKEY = $refreshHOTKEY & "ALT+"
    EndIf
    If $ischecked_shift = 1 Then
    $refreshHOTKEY = $refreshHOTKEY & "SHIFT+"
    EndIf
    $REFRESHHOTKEY = $refreshHOTKEY & GUICtrlRead ($INDyTASTE)
    GUICtrlSetData ($indytaste, "")
    GUICtrlSetState ($refreshstrg, 4)
    GUICtrlSetState ($refreshshift, 4)
    GUICtrlSetState ($refreshalt, 4)
    IniWrite (@Scriptdir & "\config.ini", "bla", "refreshhotkey", $refreshHOTKEY)
    GUICtrlSetData ($optrefreshhotkey, Iniread ("config.ini", "bla", "refreshhotkey", "error"))
    GUISetState (@SW_HIDE, $refreshgui)
    GUISetState (@SW_SHOW, $optionengui)
    _optionen()
    EndSwitch
    WEnd
    EndFunc;==>_refreshgui

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

    Func _pinggui()
    While 1
    $pingmsg = GUIGetMsg()
    Switch $pingmsg
    Case $GUI_EVENT_CLOSE
    GUISetState (@SW_HIDE, $pinggui)
    GUISetState (@SW_SHOW, $optionengui)
    _optionen()
    Case $pingback
    $ischecked_strg = GUICtrlRead ($pingstrg)
    $ischecked_alt = GUICtrlRead ($pingalt)
    $ischecked_shift = GUICtrlRead ($pingshift)
    If $ischecked_strg = 1 Then
    $PINGHOTKEY = $PINGHOTKEY & "STRG+"
    EndIf
    If $ischecked_alt = 1 Then
    $PINGHOTKEY = $PINGHOTKEY & "ALT+"
    EndIf
    If $ischecked_shift = 1 Then
    $PINGHOTKEY = $PINGHOTKEY & "SHIFT+"
    EndIf
    $PINGHOTKEY = $PINGHOTKEY & GUICtrlRead ($INDTASTE)
    GUICtrlSetData ($indtaste, "")
    GUICtrlSetState ($pingstrg, 4)
    GUICtrlSetState ($pingshift, 4)
    GUICtrlSetState ($pingalt, 4)
    IniWrite (@Scriptdir & "\config.ini", "bla", "pinghotkey", $PINGHOTKEY)
    GUICtrlSetData ($optpinghotkey, Iniread ("config.ini", "bla", "pinghotkey", "error"))
    GUISetState (@SW_HIDE, $pinggui)
    GUISetState (@SW_SHOW, $optionengui)
    _optionen()
    EndSwitch
    WEnd
    EndFunc;==>_Pinggui

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

    Func _optionen()
    GUISetState (@SW_HIDE, $hauptmenu)
    GUISetState (@SW_SHOW, $optionenGUI)
    While 1
    _heroitemcheck()
    $oMsg = GUIGetMsg()
    Switch $oMsg
    Case $GUI_EVENT_CLOSE
    GUISetState (@sw_hide, $optionengui)
    GUISetState (@SW_SHOW, $hauptmenu)
    _hauptmenu()
    Case $optpinghotkeyset
    GUISetState (@SW_HIDE, $optionenGUI)
    GUISetState (@SW_SHOW, $pingGUI)
    _pinggui()
    Case $optrefreshhotkeyset
    GUISetState (@SW_HIDE, $optionenGUI)
    GUISetState (@SW_SHOW, $refreshGUI)
    _refreshgui()
    Case $optlcpathwahl
    $optlcrealpath = FileOpenDialog ("Pfad zur .exe", "C:\", "Executables (*.exe)")
    $lcpath = $optlcrealpath
    GUICtrlSetData ($optlcpathshow, "LC Pfad: " & $lcpath)
    Case $optwc3pathwahl
    $optwc3realpath = FileOpenDialog ("Pfad zur WC3-Exe", "C:\", "Executables (*.exe)")
    GUICtrlSetData ($optwc3pathshow, "WC3 Pfad: " & $optwc3realpath)
    $wc3path = GUICtrlRead ($optwc3pathshow)
    Case $optionenback
    GUISetState (@SW_HIDE, $optionenGUI)
    GUISetState (@SW_SHOW, $hauptmenu)
    _saveall()
    _hauptmenu()
    EndSwitch
    WEnd
    EndFunc

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

    Func _runlc()
    $lcstartpath = IniRead ("config.ini", "bla", "lcpath", "blubi")
    $lcpfadstr = StringInStr ($lcstartpath, "\", 0, -1)
    $lcpfadcut = StringLen ($lcstartpath) - $lcpfadstr
    $lcpfad = StringTrimRight ($lcstartpath, $lcpfadcut)
    ShellExecute ($lcstartpath, "", $lcpfad)
    EndFunc

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

    Func _runwc()
    $startwc3path = IniRead ("config.ini", "bla", "wc3path", "blub")
    ShellExecute ($startwc3path)
    EndFunc

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

    Func _about()
    GUISetState (@SW_SHOW, $aboutgui)
    GUISetState (@SW_HIDE, $hauptmenu)
    While 1
    _heroitemcheck()
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $aboutback
    GUISetState (@SW_HIDE, $aboutgui)
    GUISetState (@SW_SHOW, $hauptmenu)
    _hauptmenu()
    EndSwitch
    WEnd
    EndFunc

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

    Func _tray()
    GUISetState (@SW_HIDE, $hauptmenu)
    AutoItSetOption ("TrayIconHide", 0)
    TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "_traydclick")
    While 1
    $traymsg = TrayGetMsg()
    Select
    Case $traymsg = 0
    ContinueLoop
    EndSelect
    WEnd
    EndFunc

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

    Func _traydclick()
    AutoItSetOption ("TrayIconHide", 1)
    GUISetState (@SW_SHOW)
    _hauptmenu()
    EndFunc

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

    Func _hauptmenu()
    While 1
    _heroitemcheck()
    If ProcessExists ("pickup.listchecker.exe") Then
    If $lcbuttonhidden = 0 Then
    GUICtrlSetState ($runlc, $GUI_DISABLE)
    $lcbuttonhidden = 1
    EndIf
    Elseif Not ProcessExists ("pickup.listchecker.exe") Then
    If $lcbuttonhidden = 1 Then
    $lcbuttonhidden = 0
    GUICtrlSetState ($runlc, $GUI_ENABLE)
    EndIf
    EndIf
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Exit
    Exit
    Case $about
    _about()
    Case $tray
    _tray()
    Case $optionen
    _optionen()
    Case $runwc3
    _runwc()
    Case $runlc
    _runlc()
    EndSwitch
    WEnd
    EndFunc

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

    Func _Taste()
    $pressed = 0
    For $buchstabe = 65 To 91
    If _IsPressed(Hex($buchstabe)) Then
    While _IsPressed (Hex($buchstabe))
    $pressed= 1
    WEnd
    ExitLoop
    EndIf
    Next
    If $pressed = 1 Then
    Return Chr($buchstabe)
    Else
    Return ""
    EndIf
    EndFunc ;==>_Taste

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

    Func _held($kaska)
    Do
    $count = $count + 1
    $read = IniRead("builds.ini", $kaska, "item" & $count, "fertig")
    $endcheck = IniRead("builds.ini", $kaska, "item" & $count + 1, "fertig")
    If $endcheck = "fertig" Then
    _sound($read, 0)
    Else
    _sound($read, 1)
    EndIf
    Until $read = "fertig"
    $read = ""
    $count = 0
    EndFunc ;==>_held

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

    Func _sound($sound, $pause)
    SoundPlay("sounds\" & $sound & ".mp3", $pause)
    EndFunc ;==>_sound

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

    Func _heroitemcheck()
    $inicheckhero = IniRead ("config.ini", "bla", "hero", "hero_error")
    If $inicheckhero = 1 Then
    $key = _Taste()
    If $key <> "" Then ;buchstabe a-z
    $hero = $hero & $key
    EndIf
    If _IsPressed ("08") Then ;backspace
    While _IsPressed ("08")
    $pressed= 1
    WEnd
    $hero = StringTrimRight ($hero, 1)
    EndIf
    If _IsPressed("0D") Then ;enter
    $num = _ArraySearch($herolist, $hero, 0, UBound($herolist), 0, 1)
    If $num<>-1 then
    _held($herolist[$num])
    EndIf
    $hero=""
    EndIf
    EndIf
    EndFunc

    _hotkeys()
    _hauptmenu()

    [/autoit]

    2 Mal editiert, zuletzt von unaimed (23. März 2009 um 20:29)