1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. FireFlyer

Beiträge von FireFlyer

  • Seiten auslesen und als Label wiedergeben

    • FireFlyer
    • 26. Mai 2008 um 21:47
    [autoit]

    #include <IE.au3>
    #include <array.au3>
    $oIE = _IECreate("http://www.rev6.com/stats/uranus/unique.asp", 0, 0)
    $sText = _IEBodyReadText ($oIE)
    $split = StringSplit($sText, @CRLF)
    MsgBox(0, "Body Text", "Ist das die Zeile die du brauchst? : "&@LF&$split[19])
    _ArrayDisplay($split)

    [/autoit]

    BugFix : nun verkomplizier die sache doch nicht wieder :D btw: du musst mir mal die sache mit den ganzen Bit erklären, hab mir dein Tut schon 100 mal durchgelesen aber ich bin zu blöd dafür mir fehlt da irgendwie der einstieg... also was das überhaupt ist und so... :(

  • _ZIp mit Autoit Plugin

    • FireFlyer
    • 26. Mai 2008 um 21:35

    ja hast du ein programm das schon automatisch bei allen rechnern dabei ist?
    Evt. sinds ja firmenrechner die sind normalerweise mit nem archiver ausgestattet

  • Seiten auslesen und als Label wiedergeben

    • FireFlyer
    • 26. Mai 2008 um 21:22

    1. Hab ich gesagt das das script nicht funktioniert.
    2. habe ich auch gesagt das du die schritte mit dem _IE funktionen vorher machen musst damit du diesen String erhältst
    3. soll mein Programm nur veranschaulichen wie du aus einem String zwischen wörtern etwas herausfiltern kannst und dass in die Labels per GUICtrlSetData eingetragen wird
    4. Die MsgBox ist nur zur veranschaulichung da

  • _ZIp mit Autoit Plugin

    • FireFlyer
    • 26. Mai 2008 um 20:40

    Kommandozeile=
    [windowstaste]+[r]
    Eingabe: Pfad7zip\7zg.exe a -mx9 C:\test.7z @ C:\liste.txt
    ok... und es passiert das selbe was autoit auch macht...
    Du musst die Software 7zip installieren erst dann gehts ;)
    Allerdings konnte ich es noch nie unter vista ausprobieren... vllt. liegts am registry eintrag keine ahnung schau mal was der wert regread ist

  • Seiten auslesen und als Label wiedergeben

    • FireFlyer
    • 26. Mai 2008 um 19:23

    Das auslesen wie oben schon beschrieben sodass du diese Zeile von der Seite als String bekommst und dann:

    [autoit]

    #include <GUIConstants.au3>
    #include <String.au3>

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

    $string = "Monster Data received Player//Spawn Estimated Time required to spawn Based on last spawn time Uruchi 667 min ago (*Spawned) 251 min Based on last spawn time TigerGirl 67 min ago 512 251 min "
    $ergebnis1 = _StringBetween($string, "Uruchi", "min")
    $ergebnis2 = _StringBetween($string, "ago", "min")
    $ergebnis3 = _StringBetween($string, "TigerGirl", "min")
    MsgBox(0, "lol", $ergebnis1[0]&", "&$ergebnis2[0]&", "&$ergebnis3[0]&", "&$ergebnis2[1])

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

    Opt("GUIOnEventMode", 1) ;Muss 1 sein da sonst der GUIOnEventMode nicht funktioniert
    GUICreate("On Event Mode", 200, 150)
    $button = GUICtrlCreateButton("Refresh", 75, 10, 50, 20)
    $label1 = GUICtrlCreateLabel("$ergebnis1[0]", 5, 30, 100)
    $label2 = GUICtrlCreateLabel("$ergebnis2[0]", 5, 50, 100)
    $label3 = GUICtrlCreateLabel("$ergebnis3[0]", 5, 70, 100)
    $label4 = GUICtrlCreateLabel("$ergebnis2[1]", 5, 90, 100)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit") ;Achtung: GUISetState bei den Constants
    GUICTRLSetOnEvent($button, "_refresh") ;und guiCTRLsetonevent bei Buttons und dergleichen
    GUISetState()
    While 1
    WEnd

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

    Func _exit()
    Exit
    EndFunc
    Func _refresh()
    GUICtrlSetData($label1, $ergebnis1[0])
    GUICtrlSetData($label2, $ergebnis2[0])
    GUICtrlSetData($label3, $ergebnis3[0])
    GUICtrlSetData($label4, $ergebnis2[1])
    EndFunc

    [/autoit]
  • FileInstall - Ausgabe erst nach Klick

    • FireFlyer
    • 26. Mai 2008 um 19:08

    Ich würde dir jedoch raten wenn du dich weiterhin mit GUIs in AutoIt beschäftigst dir den GUIOnEventModus anzuschauen, denn so wie es jetzt bei dir ist wird quasi mehrmals pro sekunde abgefragt ob ein bestimmter Button gedrückt ist oder nicht. Beim OnEventModus muss das nicht sein, d.h. gerade bei sehr großen/komplexen oder auch mehreren GUIs wird das Programm dann sehr schnell ausgebremst. Hier mal ein kleines beispiel:

    [autoit]

    #include <GUIConstants.au3>
    Opt("GUIOnEventMode", 1) ;Muss 1 sein da sonst der GUIOnEventMode nicht funktioniert
    GUICreate("On Event Mode", 200, 50)
    $button = GUICtrlCreateButton("test", 75, 15, 50, 20)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit") ;Achtung: GUISetState bei den Constants
    GUICTRLSetOnEvent($button, "_test") ;und guiCTRLsetonevent bei Buttons und dergleichen
    GUISetState()
    While 1
    WEnd

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

    Func _exit()
    Exit
    EndFunc
    Func _test()
    MsgBox(0, "Test", "Test")
    EndFunc

    [/autoit]

    Der einzige "Nachteil" bei der OnEvent sache ist: Dass du quasi für jede "ausführung" eine Funktion schreiben musst ;)

  • Seiten auslesen und als Label wiedergeben

    • FireFlyer
    • 26. Mai 2008 um 17:21

    wenn du das von Webseiten auslesen willst würde ich dir die _StringBetween funktion empfehlen ;)
    Als label das anzeigen lassen macht man wie oben schon beschrieben mit GUICtrlSetData

  • _ZIp mit Autoit Plugin

    • FireFlyer
    • 26. Mai 2008 um 17:07

    dann nimm 7zip nimm die Obere Kommandozeile und mache untendran:

    [autoit]

    FileMove($7zipdatei, "deinpfad\deinedatei.gad", 1)

    [/autoit]


    Also hier nochmal alles zusammen: 7zip kannst du natürlich auch mit autoit installieren, das solltest du alleine hinkriegen ;)

    Spoiler anzeigen
    [autoit]

    $regread = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip", "Path")
    FileWriteLine(@TempDir&"\7zipliste.lst", "C:\Datei1.bmp")
    FileWriteLine(@TempDir&"\7zipliste.lst", "C:\Datei2.bmp")
    FileWriteLine(@TempDir&"\7zipliste.lst", "C:\Datei3.bmp")
    RunWait($regread & "\7zG.exe a -mx9 C:\test.7z @" & @TempDir & "\7zipliste.lst")
    FileMove("C:\test.7z", "C:\test.gad", 1)
    FileDelete(@TempDir&"\7zipliste.lst")

    [/autoit]
  • Kann Autoit warten bis ein bestimmtes Gerät an den PC angeschlossen wird?

    • FireFlyer
    • 26. Mai 2008 um 17:05

    Also ich habe das auch per Regmon und meinem USB-Stick gemacht :)
    War ganz simpel:
    In einer While Schleife habe ich nachgeschaut ob 3 Registry einträge existieren bzw. den richtigen Wert haben wenn ja kam bei mir einfach mal zum Test eine MsgBox, ansonsten lief alles weiter ;)
    Sollte mit deinem Handy genau gleich sein... evt. kannst du das Programm dann auch als Dienst laufen lassen ;) Find grad den Link nich aber ich hab mal auf ner Seite gelesen wie man Programme als Dienst laufen lassen kann :)

  • _ZIp mit Autoit Plugin

    • FireFlyer
    • 26. Mai 2008 um 16:58

    also WinZip ist standardmäßig nicht installiert,
    Ich hab für einen Uploader auch 7Zip bzw. WinRar benutzt funktioniert mit dem Kommandozeilen modus recht gut ;)
    Hier mal der Teil des Codes der mit 7Zip arbeitet ;):

    Spoiler anzeigen
    [autoit]

    RunWait($regread & "\7zG.exe a -mx9 C:\Spiel" & $rarfile & " @" & @TempDir & "\liste.lst");Mein Script liest den Pfad zur 7zG.exe aus
    ;der Registry aus mit den Pararmeter: a & -mx9 wird beschrieben das 1. Dateien gepackt werden sollen und mit mx9 die Kompressionsrate:
    ;C:\Spiel\dateiname mit .7z endung und alle dateien die darein gepackt werden sollen stehen in der vorher von
    ;autoit geschriebenen liste.lst ;) also eigentlich ganz simpel

    [/autoit]
  • FileInstall - Ausgabe erst nach Klick

    • FireFlyer
    • 26. Mai 2008 um 16:47

    Einfach so:

    [autoit]

    $button = GUICtrlCreateButton("Script installieren", 5,5,100)
    GUICtrlSetOnEvent($button, "_install")
    Func _install()
    FileInstall("deinscript", "dir", 1) ;Wenn die Datei schon existiert wird sie überschrieben
    EndFunc
    ;Beziehungsweise mit GUIGetMsg()
    While 1
    Select
    Case GUIGetMsg() = $button
    _install()
    EndSelect
    WEnd

    [/autoit]


    Da fehlen jetzt natürlich ein paar sachen aber so funktioniert es ;)

    Du brauchst das FileInstall am anfang nicht, die Datei wird trotzdem in die exe mit eingebaut aber halt erst ausgegeben wenn der Button gedrückt wurde ;)

  • Hab ein kleines Problem!

    • FireFlyer
    • 25. Mai 2008 um 22:45

    Da ich jetzt mal ganz nett war und grad mal wieder geil auf programmieren ^^ ... ihr kennt das ja xD Hab ich dir schnuffi das ganze Programm mal im GUIOnEventMode geschrieben benutz es als vorlage für weitere Programme ;)

    Spoiler anzeigen
    [autoit]

    Opt('TrayMenuMode', 1)
    Opt('GUIOnEventMode', 1)
    Opt('TrayOnEventMode', 1)

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

    #include <GUIConstants.au3>
    $12 = TrayCreateItem ('Beenden')
    $13 = TrayCreateItem ('Beenden SRO')
    $15 = TrayCreateItem ("Wiederherstellen")
    $14 = TrayCreateItem ("Wiederherstellen SRO")
    TrayCreateItem ("")
    $16 = TrayCreateItem ("Info")
    $17 = TrayCreateItem ("Hilfe")

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

    Hotkeyset ("{F11}", "_Func6")

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("SRO_Helper", 424, 281, 193, 125)
    GUISetBkColor(0x000000)
    $Start = GUICtrlCreateButton("Start", 8, 8, 65, 25, 0)
    GUICtrlSetFont(-1, 11, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Stop = GUICtrlCreateButton("Stop", 88, 8, 65, 25, 0)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $exp_x = GUICtrlCreateInput("Exp pro Mob", 24, 64, 113, 26)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $exp_y = GUICtrlCreateInput("Vorhandene Exp", 24, 96, 113, 26)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $exp = GUICtrlCreateInput("Exp für Level up", 24, 128, 113, 26)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $re = GUICtrlCreateButton("rechnen", 24, 160, 49, 17, 0)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Er1 = GUICtrlCreateEdit("", 160, 64, 81, 17)
    GUICtrlSetData(-1, "Ergebniss 1")
    $MobInfo = GUICtrlCreateList("", 24, 184, 257, 24)
    GUICtrlSetData(-1, "...China Mobs...|lvl 01 Mangyang [54]|lvl 02 Small-Eye Ghost [55]|lvl 03 Big-Eye Ghost [85]|lvl 04 Old Weasel [83]|lvl 05 Weasel [119]|lvl 06 Water Ghost slave [114]|lvl 07 Water Ghost [156]|lvl 08 Broken Stone ghost [204]|lvl 08 Grave Stone spirit [204]|lvl 09 Grave Stone [194]|lvl 09 Stone Ghost [194]|lvl 10 Decayed Yeoha [249]|lvl 10 Yeoha [249]|lvl 11 Bandit Subordinates [310]|lvl 12 Bandit Archer [324]|lvl 13 Young Tiger [387]|lvl 14 Tiger [509]|lvl 15 Bandit Bowman [514]|lvl 16 Bandit [755]|lvl 17 Black Tiger [749]|lvl 18 White Tiger [809]|lvl 19 Chajki Worker [958]|lvl 20 Chajki [1031]|lvl 20 Tiger Girl [598.720] (unique)|lvl 21 Ghost Bug [1106]|lvl 22 Devil Bug [1184]|lvl 23 Hyungeon Ghost Soldier [1264]|lvl 24 Hyungeon Ghost [1347]|lvl 25 Demon Horse [1291]|lvl 26 Devil Horse [1184]|lvl 27 Earth Ghost [1451]|lvl 27 Meek Gun Powder [1535]|lvl 28 Gun Powder [1535]|lvl 28 Meek Earth Ghost [1535]|lvl 29 Hyeongcheon [1807]|lvl 30 Earth Magician [1513]|lvl 30 Earth Taoist [1513]|lvl 30 Hyeongcheon [1909]|lvl 31 Black Scorpion [2013]|lvl 32 Scorpion [2121]|lvl 33 Blood Devil Flower [1761]|lvl 33 Blood Ong [1997]|lvl 34 Blood Death Flower [1849]|lvl 34 Ong [2099]|lvl 35 Black Robber Follower [2204]|lvl 35 Black Yeowa [2467]|lvl 36 Black Robber Archer [2034]|lvl 36 Red Yeowa [2590]|lvl 37 Black Robber Bowman [2131]|lvl 38 Black Robber [2539]|lvl 39 Small Red Scorpion [2982]|lvl 40 Red Scorpion [3121]|lvl 40 Uruchi [1.779.528] (unique)|lvl 41 Red-eye Ghost [2907]|lvl 42 Dark-eye Ghost [3038]|lvl 43 Maong [3172]|lvl 44 Small Bunwang [3311]|lvl 45 Bunwang [3454]|lvl 46 Ultra Blood Devil [4052]|lvl 47 Golden Spider [3753]|lvl 48 White Spider [3909]|lvl 49 Mujigi [3557]|lvl 50 Ujigi [3701]|lvl 51 Ishade [3849]|lvl 52 Blue-face Spider [4584]|lvl 52 Hashade [4001]|lvl 53 White-face Spider [4766]|lvl 54 Penon Fighter [5586]|lvl 55 Penon Warrior [6084]|lvl 56 Plana [6317]|lvl 57 Big-blue Spider [5809]|lvl 57 Sonar [6557]|lvl 58 Big White-face Spider [6027]|lvl 59 Yeti [7059]|lvl 60 Devil Yeti [7634]|lvl 60 Isyutaru [4.324.612] (unique)|lvl 61 Shakram [7003]|lvl 61 Soil Ghost Bug [7913]|lvl 62 Strong Earth Ghost [8200]|lvl 63 Earth Ghost Bug [8495]|lvl 63 Edimmu [7515]|lvl 64 Power Earth Ghost [9139]|lvl 65 Dark Karra [7270]|lvl 65 Earth Ghost Warrior [9461]|lvl 66 Earth Ghost Solider [9792]|lvl 67 Blind Mole [8957]|lvl 67 Death Karra [10133]|lvl 68 Demon Eye [9265]|lvl 68 Mole [9265]|lvl 69 Devil Ghost Nachal [8321]|lvl 69 Gold-silver Yacha [10844]|lvl 70 Devil Eye [9909]|lvl 70 Devil Mask Nachal [8603]|lvl 70 Diamond Yacha [11214]|lvl 71 Bone Soldier [11596]|lvl 73 Niya Guard [12816]|lvl 74 Niya Sniper [10144]|lvl 76 Niya Hunter [10819]|lvl 77 Niya Mage [11170]|lvl 78 Niya Shaman [11532]|lvl 79 Niya Royal Guard [11903]|lvl 80 Lord Yarkan [9.353.045] (unique) |lvl 80 Niya General [14614]")
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Prozent = GUICtrlCreateLabel("Prozent pro Mob", 256, 64, 188, 22)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Er2 = GUICtrlCreateEdit("", 160, 96, 81, 17)
    GUICtrlSetData(-1, "Ergebniss 2")
    $Mobzukillen = GUICtrlCreateLabel("Mob bis Lvl-Up zu killen", 248, 96, 188, 22)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $er3 = GUICtrlCreateEdit("", 160, 128, 81, 17)
    GUICtrlSetData(-1, "Ergebniss 3")
    $vonnullaufup = GUICtrlCreateLabel("von 0% bis 100%", 248, 128, 188, 22)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $clear = GUICtrlCreateButton("clear",288, 184, 113, 25, 0)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Hide = GUICtrlCreateButton("Hide", 168, 8, 65, 25, 0)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Schliessen = GUICtrlCreateButton("Schliessen", 248, 8, 81, 25, 0)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $G = GUICtrlCreateLabel("G Press", 64, 40, 44, 22)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $SRO_Client = GUICtrlCreateLabel("SRO_Client", 216, 40, 73, 22)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $SRO_Helper = GUICtrlCreateLabel("SRO_Helper", 296, 248, 104, 17)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $List1 = GUICtrlCreateList("", 24, 216, 257, 24)
    GUICtrlSetData(-1, "...Euro Mobs...|lvl 01 Movia [54]|lvl 02 Movoi [55]|lvl 03 Graesp [85]|lvl 04 Edenp [83]|lvl 05 Baroi Wolf [119]|lvl 06 Barus Wolf [114]|lvl 07 Logos Baroi [158]|lvl 08 Bartis [204]|lvl 09 Misos Baroi [192]|lvl 10 Barpolle [249]|lvl 11 Dow Genetos [310]|lvl 12 Dow Genema [359]|lvl 12 Kiklopes [359]|lvl 13 Brontes [411]|lvl 14 Aduna Ladon [470]|lvl 15 Polipemos [607]|lvl 16 Simos Ladon [628]|lvl 17 Nemea"&Chr(39)&"s Lion [749]|lvl 18 Seirenes [730]|lvl 19 Selene"&Chr(39)&"s Lion [871]|lvl 20 Seiren [840]|lvl 21 Megalopa [1106]|lvl 22 pilot log [1184]|lvl 23 Crab [1264]|lvl 23 Pirate Brigand [1264]|lvl 24 Cerberus [693.072] (unique)|lvl 24 Dark Wolf [1347]|lvl 25 Evil Wolf [1433]|lvl 26 Evil Order Archer [1217]|lvl 27 Evil Order Hunter [1287]|lvl 27 Evil Order Warrior [1614]|lvl 28 Evil Order Soldier [1709]|lvl 29 Closier [1807]|lvl 30 Captin Ivy [1.094.835] (unique)|lvl 30 Punisher [1909]|lvl 31 Kokoru [1593]|lvl 32 Periton [1676]|lvl 33 Blood Ong [1997]|lvl 34 Ong [2099]|lvl 35 Hun Archer [1940]|lvl 36 Hun Defense Lancer [2312]|lvl 36 Hun Shooter [2034]|lvl 37 Hun Assault Lancer [2424]|lvl 37 Sosungsung [2424]|lvl 38 Sungsung [2539]|lvl 39 Stone Golem [2982]|lvl 40 Rock Golem [3121] ")
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $List2 = GUICtrlCreateList("", 24, 248, 257, 24)
    GUICtrlSetData(-1, ".Roc Mounten Mobs:|lvl 70 Feather Cloke [8603]|lvl 72 Black Eagle [10954]|lvl 73 Feather Mask [9820]|lvl 75 Shawo [10477]|lvl 76 Goat [10819]|lvl 78 Wing Tribe [11532]|lvl 80 Wing Tribe Guardian [12666]|lvl 82 Antinoke [13482]|lvl 83 Antlerope [13906]|lvl 85 Wing Tribe Chaser [17077]|lvl 87 Wing Tribe Attacker [18159]|lvl 88 Rocky [18722]|lvl 90 Demon Shaitan [12.732.060] (unique) ")
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    Global $client1 = "SRO_Helper"
    TraySetState()
    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
    GUICtrlSetOnEvent($Schliessen, "_Func1")
    GUICtrlSetOnEvent($clear, "_Func2")
    GUICtrlSetOnEvent($Hide, "_Func3")
    GUICtrlSetOnEvent($re, "_Func4")
    GUICtrlSetOnEvent($Start, "_Func5")
    GUICtrlSetOnEvent($Stop, "_Func6")

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

    TrayItemSetOnEvent($12, "_exit")
    TrayItemSetOnEvent($13, "_Func1")
    TrayItemSetOnEvent($14, "_TrayFunc1")
    TrayItemSetOnEvent($15, "_TrayFunc2")
    TrayItemSetOnEvent($16, "_TrayFunc3")
    TrayItemSetOnEvent($17, "_TrayFunc4")
    While 1
    WEnd

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

    Func _exit()
    Exit
    EndFunc
    Func _Func1()
    $exist = ProcessExists ("SRO_Client.exe")
    If $exist = 0 Then
    MsgBox (0, "Error", "SRO_Client.exe" & " konnte nicht gefunden werden!")
    Else
    ProcessClose ("SRO_Client.exe")
    EndIf
    EndFunc
    Func _Func2()
    GUICtrlSetData ($exp, "Exp für Level up")
    GUICtrlSetData ($exp_x, "Exp pro Mob")
    GUICtrlSetData ($exp_y, "Vorhandene Exp")
    GUICtrlSetData ($Er1, "Ergebniss 1")
    GUICtrlSetData ($er2, "Ergebniss 2")
    GUICtrlSetData ($er3, "Ergebniss 3")
    EndFunc
    Func _Func3()
    WinSetState("SRO_Client","", @SW_HIDE)
    EndFunc
    Func _Func4()
    $1 = GUICtrlRead ($exp)
    $2 = GUICtrlRead ($exp_x)
    $3 = GUICtrlRead ($exp_y)

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

    $pro = (100/$1*$2)
    GUICtrlSetData ($Er1,$pro)

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

    $ins = (100/(100/$1*$2))
    GUICtrlSetData ($er3,$ins)

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

    $neu = ($1-$3)
    $neu_x = (100/$neu*$2)
    $lvl = (100/$neu_x)
    GUICtrlSetData ($er2,$lvl)
    EndFunc
    Func _Func5()
    AdlibEnable("_start", 500)
    EndFunc
    Func _Func6()
    AdlibDisable()
    EndFunc

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

    Func _TrayFunc1()
    WinSetState("SRO_Client","", @SW_SHOW)
    EndFunc
    Func _TrayFunc2()
    GUISetState (@sw_show)
    EndFunc
    Func _TrayFunc3()
    MsgBox (0, "Info", "Diese Tool wurde für dsa Onlinegame Silkroad Online erstellt, und ist Free, von daher nicht zu verkaufen" & " Mit freundlichen Grüßen " & "Nismo - Production")
    EndFunc
    Func _TrayFunc4()
    MsgBox (0, "Hilfe-Datei", "Die Hilfe Datei erscheint, bei beendigung, in der neueren Version 1.2")
    EndFunc

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

    Func _start()
    Send ("g")
    EndFunc

    [/autoit]

    Damit der BugFix auch seine ruhe gibt und heute nacht gut schlafen kann, hab ich EXTRA für ihn auch die AdlibEnable funktion eingebaut :D

  • Hab ein kleines Problem!

    • FireFlyer
    • 25. Mai 2008 um 22:15

    man bugfix... das war jetzt die schnellste und einfachste änderung, wie gesagt ich würde das mit GUIOnEventMode machen dann haste die ganzen Fehler was er hier hat ehh net xD

    Aber was bringt adlibenable? is ja quasi auch ne schleife (halt in verkürzter form)

    [autoit]

    AdlibEnable("_test", 100)
    ;=
    While 1
    _test()
    Sleep(100)
    WEnd
    Func _test()
    ;...
    EndFunc

    [/autoit]

    Und was für Vorteile bietet denn der Msg mode?... hab da drin wie gesagt noch nie en vorteil gesehen

  • Hab ein kleines Problem!

    • FireFlyer
    • 25. Mai 2008 um 22:08

    Lieg daran das wenn die While schleife mit dem send G läuft er die select abfrage nicht mehr macht, ich hab das so gelöst:

    Spoiler anzeigen
    [autoit]

    Opt('TrayMenuMode', 1)
    ;Opt('TrayOnEventMode', 1)

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

    #include <GUIConstants.au3>
    $12 = TrayCreateItem ('Beenden')
    $13 = TrayCreateItem ('Beenden SRO')
    $15 = TrayCreateItem ("Wiederherstellen")
    $14 = TrayCreateItem ("Wiederherstellen SRO")
    TrayCreateItem ("")
    $16 = TrayCreateItem ("Info")
    $17 = TrayCreateItem ("Hilfe")

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

    Hotkeyset ("{F11}", "_stop")

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("SRO_Helper", 424, 281, 193, 125)
    GUISetBkColor(0x000000)
    $Start = GUICtrlCreateButton("Start", 8, 8, 65, 25, 0)
    GUICtrlSetFont(-1, 11, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Stop = GUICtrlCreateButton("Stop", 88, 8, 65, 25, 0)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $exp_x = GUICtrlCreateInput("Exp pro Mob", 24, 64, 113, 26)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $exp_y = GUICtrlCreateInput("Vorhandene Exp", 24, 96, 113, 26)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $exp = GUICtrlCreateInput("Exp für Level up", 24, 128, 113, 26)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $re = GUICtrlCreateButton("rechnen", 24, 160, 49, 17, 0)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Er1 = GUICtrlCreateEdit("", 160, 64, 81, 17)
    GUICtrlSetData(-1, "Ergebniss 1")
    $MobInfo = GUICtrlCreateList("", 24, 184, 257, 24)
    GUICtrlSetData(-1, "...China Mobs...|lvl 01 Mangyang [54]|lvl 02 Small-Eye Ghost [55]|lvl 03 Big-Eye Ghost [85]|lvl 04 Old Weasel [83]|lvl 05 Weasel [119]|lvl 06 Water Ghost slave [114]|lvl 07 Water Ghost [156]|lvl 08 Broken Stone ghost [204]|lvl 08 Grave Stone spirit [204]|lvl 09 Grave Stone [194]|lvl 09 Stone Ghost [194]|lvl 10 Decayed Yeoha [249]|lvl 10 Yeoha [249]|lvl 11 Bandit Subordinates [310]|lvl 12 Bandit Archer [324]|lvl 13 Young Tiger [387]|lvl 14 Tiger [509]|lvl 15 Bandit Bowman [514]|lvl 16 Bandit [755]|lvl 17 Black Tiger [749]|lvl 18 White Tiger [809]|lvl 19 Chajki Worker [958]|lvl 20 Chajki [1031]|lvl 20 Tiger Girl [598.720] (unique)|lvl 21 Ghost Bug [1106]|lvl 22 Devil Bug [1184]|lvl 23 Hyungeon Ghost Soldier [1264]|lvl 24 Hyungeon Ghost [1347]|lvl 25 Demon Horse [1291]|lvl 26 Devil Horse [1184]|lvl 27 Earth Ghost [1451]|lvl 27 Meek Gun Powder [1535]|lvl 28 Gun Powder [1535]|lvl 28 Meek Earth Ghost [1535]|lvl 29 Hyeongcheon [1807]|lvl 30 Earth Magician [1513]|lvl 30 Earth Taoist [1513]|lvl 30 Hyeongcheon [1909]|lvl 31 Black Scorpion [2013]|lvl 32 Scorpion [2121]|lvl 33 Blood Devil Flower [1761]|lvl 33 Blood Ong [1997]|lvl 34 Blood Death Flower [1849]|lvl 34 Ong [2099]|lvl 35 Black Robber Follower [2204]|lvl 35 Black Yeowa [2467]|lvl 36 Black Robber Archer [2034]|lvl 36 Red Yeowa [2590]|lvl 37 Black Robber Bowman [2131]|lvl 38 Black Robber [2539]|lvl 39 Small Red Scorpion [2982]|lvl 40 Red Scorpion [3121]|lvl 40 Uruchi [1.779.528] (unique)|lvl 41 Red-eye Ghost [2907]|lvl 42 Dark-eye Ghost [3038]|lvl 43 Maong [3172]|lvl 44 Small Bunwang [3311]|lvl 45 Bunwang [3454]|lvl 46 Ultra Blood Devil [4052]|lvl 47 Golden Spider [3753]|lvl 48 White Spider [3909]|lvl 49 Mujigi [3557]|lvl 50 Ujigi [3701]|lvl 51 Ishade [3849]|lvl 52 Blue-face Spider [4584]|lvl 52 Hashade [4001]|lvl 53 White-face Spider [4766]|lvl 54 Penon Fighter [5586]|lvl 55 Penon Warrior [6084]|lvl 56 Plana [6317]|lvl 57 Big-blue Spider [5809]|lvl 57 Sonar [6557]|lvl 58 Big White-face Spider [6027]|lvl 59 Yeti [7059]|lvl 60 Devil Yeti [7634]|lvl 60 Isyutaru [4.324.612] (unique)|lvl 61 Shakram [7003]|lvl 61 Soil Ghost Bug [7913]|lvl 62 Strong Earth Ghost [8200]|lvl 63 Earth Ghost Bug [8495]|lvl 63 Edimmu [7515]|lvl 64 Power Earth Ghost [9139]|lvl 65 Dark Karra [7270]|lvl 65 Earth Ghost Warrior [9461]|lvl 66 Earth Ghost Solider [9792]|lvl 67 Blind Mole [8957]|lvl 67 Death Karra [10133]|lvl 68 Demon Eye [9265]|lvl 68 Mole [9265]|lvl 69 Devil Ghost Nachal [8321]|lvl 69 Gold-silver Yacha [10844]|lvl 70 Devil Eye [9909]|lvl 70 Devil Mask Nachal [8603]|lvl 70 Diamond Yacha [11214]|lvl 71 Bone Soldier [11596]|lvl 73 Niya Guard [12816]|lvl 74 Niya Sniper [10144]|lvl 76 Niya Hunter [10819]|lvl 77 Niya Mage [11170]|lvl 78 Niya Shaman [11532]|lvl 79 Niya Royal Guard [11903]|lvl 80 Lord Yarkan [9.353.045] (unique) |lvl 80 Niya General [14614]")
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Prozent = GUICtrlCreateLabel("Prozent pro Mob", 256, 64, 188, 22)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Er2 = GUICtrlCreateEdit("", 160, 96, 81, 17)
    GUICtrlSetData(-1, "Ergebniss 2")
    $Mobzukillen = GUICtrlCreateLabel("Mob bis Lvl-Up zu killen", 248, 96, 188, 22)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $er3 = GUICtrlCreateEdit("", 160, 128, 81, 17)
    GUICtrlSetData(-1, "Ergebniss 3")
    $vonnullaufup = GUICtrlCreateLabel("von 0% bis 100%", 248, 128, 188, 22)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $clear = GUICtrlCreateButton("clear",288, 184, 113, 25, 0)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Hide = GUICtrlCreateButton("Hide", 168, 8, 65, 25, 0)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $Schliessen = GUICtrlCreateButton("Schliessen", 248, 8, 81, 25, 0)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $G = GUICtrlCreateLabel("G Press", 64, 40, 44, 22)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $SRO_Client = GUICtrlCreateLabel("SRO_Client", 216, 40, 73, 22)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $SRO_Helper = GUICtrlCreateLabel("SRO_Helper", 296, 248, 104, 17)
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $List1 = GUICtrlCreateList("", 24, 216, 257, 24)
    GUICtrlSetData(-1, "...Euro Mobs...|lvl 01 Movia [54]|lvl 02 Movoi [55]|lvl 03 Graesp [85]|lvl 04 Edenp [83]|lvl 05 Baroi Wolf [119]|lvl 06 Barus Wolf [114]|lvl 07 Logos Baroi [158]|lvl 08 Bartis [204]|lvl 09 Misos Baroi [192]|lvl 10 Barpolle [249]|lvl 11 Dow Genetos [310]|lvl 12 Dow Genema [359]|lvl 12 Kiklopes [359]|lvl 13 Brontes [411]|lvl 14 Aduna Ladon [470]|lvl 15 Polipemos [607]|lvl 16 Simos Ladon [628]|lvl 17 Nemea"&Chr(39)&"s Lion [749]|lvl 18 Seirenes [730]|lvl 19 Selene"&Chr(39)&"s Lion [871]|lvl 20 Seiren [840]|lvl 21 Megalopa [1106]|lvl 22 pilot log [1184]|lvl 23 Crab [1264]|lvl 23 Pirate Brigand [1264]|lvl 24 Cerberus [693.072] (unique)|lvl 24 Dark Wolf [1347]|lvl 25 Evil Wolf [1433]|lvl 26 Evil Order Archer [1217]|lvl 27 Evil Order Hunter [1287]|lvl 27 Evil Order Warrior [1614]|lvl 28 Evil Order Soldier [1709]|lvl 29 Closier [1807]|lvl 30 Captin Ivy [1.094.835] (unique)|lvl 30 Punisher [1909]|lvl 31 Kokoru [1593]|lvl 32 Periton [1676]|lvl 33 Blood Ong [1997]|lvl 34 Ong [2099]|lvl 35 Hun Archer [1940]|lvl 36 Hun Defense Lancer [2312]|lvl 36 Hun Shooter [2034]|lvl 37 Hun Assault Lancer [2424]|lvl 37 Sosungsung [2424]|lvl 38 Sungsung [2539]|lvl 39 Stone Golem [2982]|lvl 40 Rock Golem [3121] ")
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    $List2 = GUICtrlCreateList("", 24, 248, 257, 24)
    GUICtrlSetData(-1, ".Roc Mounten Mobs:|lvl 70 Feather Cloke [8603]|lvl 72 Black Eagle [10954]|lvl 73 Feather Mask [9820]|lvl 75 Shawo [10477]|lvl 76 Goat [10819]|lvl 78 Wing Tribe [11532]|lvl 80 Wing Tribe Guardian [12666]|lvl 82 Antinoke [13482]|lvl 83 Antlerope [13906]|lvl 85 Wing Tribe Chaser [17077]|lvl 87 Wing Tribe Attacker [18159]|lvl 88 Rocky [18722]|lvl 90 Demon Shaitan [12.732.060] (unique) ")
    GUICtrlSetFont(-1, 12, 400, 2, "Monotype Corsiva")
    GUICtrlSetColor(-1, 0xFF0000)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    Global $client1 = "SRO_Helper"
    TraySetState()

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

    Func _msg()
    $nMsg = GUIGetMsg()
    $trMsg = TrayGetMsg()
    Select
    Case $nMsg = $GUI_EVENT_CLOSE
    Exit
    Case $nMsg = $Schliessen
    $exist = ProcessExists ("SRO_Client.exe")
    If $exist = 0 Then
    MsgBox (0, "Error", "SRO_Client.exe" & " konnte nicht gefunden werden!")
    Else
    ProcessClose ("SRO_Client.exe")
    EndIf
    Case $nMsg = $clear
    GUICtrlSetData ($exp, "Exp für Level up")
    GUICtrlSetData ($exp_x, "Exp pro Mob")
    GUICtrlSetData ($exp_y, "Vorhandene Exp")
    GUICtrlSetData ($Er1, "Ergebniss 1")
    GUICtrlSetData ($er2, "Ergebniss 2")
    GUICtrlSetData ($er3, "Ergebniss 3")
    Case $nMsg = $Hide
    WinSetState("SRO_Client","", @SW_HIDE)
    Case $nMsg = $re
    $1 = GUICtrlRead ($exp)
    $2 = GUICtrlRead ($exp_x)
    $3 = GUICtrlRead ($exp_y)

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

    $pro = (100/$1*$2)
    GUICtrlSetData ($Er1,$pro)

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

    $ins = (100/(100/$1*$2))
    GUICtrlSetData ($er3,$ins)

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

    $neu = ($1-$3)
    $neu_x = (100/$neu*$2)
    $lvl = (100/$neu_x)
    GUICtrlSetData ($er2,$lvl)
    Case $nMsg = $Start
    _start()
    Case $nMsg = $Stop
    _stop()
    EndSelect
    Select
    Case $trMsg = $12
    exit
    Case $trMsg = $13
    $exist = ProcessExists ("SRO_Client.exe")
    If $exist = 0 Then
    MsgBox (0, "Error", "SRO_Client.exe" & " konnte nicht gefunden werden!")
    Else
    ProcessClose ("SRO_Client.exe")
    EndIf
    Case $trMsg = $14
    WinSetState("SRO_Client","", @SW_SHOW)
    Case $trMsg = $15
    GUISetState (@sw_show)
    Case $trMsg = $16
    MsgBox (0, "Info", "Diese Tool wurde für dsa Onlinegame Silkroad Online erstellt, und ist Free, von daher nicht zu verkaufen" & " Mit freundlichen Grüßen " & "Nismo - Production")
    Case $trMsg = $17
    MsgBox (0, "Hilfe-Datei", "Die Hilfe Datei erscheint, bei beendigung, in der neueren Version 1.2")
    EndSelect
    EndFunc

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

    While 1
    _msg()
    WEnd
    Func _start()
    While 1
    Send ("g")
    ;Sleep (500)
    _msg()
    WEnd
    EndFunc

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

    Func _stop()
    While 1
    _msg()
    WEnd
    EndFunc

    [/autoit]


    Funktioniert aber auch nur wenn man das Sleep in der While schleife weglässt...
    Aber mal so:
    Ich bin kein Freund von GUIGetMsg ich hab dadrin noch nie einen Vorteil gesehen, ich persönlich benutze den GUIOnEvent Mode d.h. es muss nicht ständig abgefragt werden ob ein Button gedrückt ist oder nicht:
    Das ganze Funktioniert so: (is jetzt nur so hingeschrieben)

    [autoit]

    #include <GUIConstants.au3>
    Opt("GUIOnEventMode", 1)
    GUICreate("TEST", 100, 100)
    $button = GUICtrlCreateButton("Test", 5, 5, 80)
    GUICtrlSetOnEvent($button, "_testfunktion") ;D.h. Funktion _testfunktion wird ausgeführt wenn der Button gedrückt wurde
    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit") ;$GUI_EVENT_CLOSE ist im Grunde genommen ja auch nur ein Button allerdings muss man aufpassen: diese sachen werden mit GUISetOnEvent "abgefragt" und buttons/andere Objekte IM Fenster mit GUICTRLSetOnEvent
    GUISetState()
    While 1
    WEnd
    Func _testfunktion()
    MsgBox(0, "TEST", "das ist ein Test")
    EndFunc
    Func _exit()
    Exit
    EndFunc

    [/autoit]
  • Die schnelligkeit von GUICtrlSetData

    • FireFlyer
    • 23. Mai 2008 um 20:55

    Sry Xeno musste heute morgen leider schnell gehen,

    Nein also das Initialbefüllen dauert relativ lange, ich vermute halt das es einfach an der Datenmenge d.h. dem viel längeren String liegt...

    Ein lauffähiges Script zu posten wird kaum möglich sein da es auf verschiedene Datenbanken usw zurückgreift. Das Problem ist jedoch ganz einfach nimm einmal 100 Inputboxen und befülle die und Messe die Zeit dann Nimm 100 Comboboxen die du mit einem String befüllst und dann mit dem Defaultwert das anzeigen lässt was normalerweise direkt in der Inputbox stünde ;). Das dauert bei mir halt auf jeden fall länger aber ich schätze mal da werd ich net viel optimieren können...

  • Die schnelligkeit von GUICtrlSetData

    • FireFlyer
    • 23. Mai 2008 um 09:59

    Hier mal ein winziger ausschnitt gekürzt von meiner Datei öffnen funktion

    Spoiler anzeigen
    [autoit]

    For $b = 1 To $max_starts ;(kann max. 200 sein)
    ;Hier lädt er verschiedene Daten aus datenbanken und durchsucht die Datei die zu öffnen ist
    If $open_line <> 1 And $open_line <> 2 Then
    $lineelse_read_array = StringSplit($file_read_array[$open_line], ";")
    GUICtrlSetData($array_inputs[$open_line-2][0], $lineelse_read_array[2],$lineelse_read_array[2]) ;Combobox
    GUICtrlSetData($array_inputs[$open_line-2][1], $lineelse_read_array[3])
    ;GUICtrlSetData($array_inputs[$open_line-2][2], $lineelse_read_array[4])
    GUICtrlSetData($array_inputs[$open_line-2][2], $lineelse_read_array[4],$lineelse_read_array[4]) ;Combobox
    ;GUICtrlSetData($array_inputs[$open_line-2][3], $lineelse_read_array[5])
    GUICtrlSetData($array_inputs[$open_line-2][3], $lineelse_read_array[5],$lineelse_read_array[5]) ;Combobox
    GUICtrlSetData($array_inputs[$open_line-2][4], $lineelse_read_array[6])
    GUICtrlSetData($array_inputs[$open_line-2][5], $lineelse_read_array[7])
    GUICtrlSetData($array_inputs[$open_line-2][6], $lineelse_read_array[8])
    $split_start = StringSplit($lineelse_read_array[9], ":")
    GUICtrlSetData($array_inputs[$open_line-2][7], $split_start[1])
    GUICtrlSetData($array_inputs[$open_line-2][8], $split_start[2])
    $split_land = StringSplit($lineelse_read_array[10], ":")
    GUICtrlSetData($array_inputs[$open_line-2][9], $split_land[1])
    GUICtrlSetData($array_inputs[$open_line-2][10], $split_land[2])
    $split_flug = StringSplit($lineelse_read_array[11], ":")
    GUICtrlSetData($array_inputs[$open_line-2][11], $split_flug[1])
    GUICtrlSetData($array_inputs[$open_line-2][12], $split_flug[2])
    GUICtrlSetData($array_inputs[$open_line-2][13], $lineelse_read_array[12])
    EndIf
    ;noch ein paar sachen
    Next

    [/autoit]


    So seitdem ich die 2 unteren Inputs durch Comboboxen ersetzt habe dauert das ganze sehr viel länger ;)

  • Die schnelligkeit von GUICtrlSetData

    • FireFlyer
    • 22. Mai 2008 um 22:36

    Hier einfach mal das Beispiel aus dem AutoComplete
    Ich hab das genauso (naja natürlich ohne die unnötigen sachen wie debugprint usw^^) mit gaaaanz vielen comboboxen, was ja keinen unterschied macht da der WM_COMMAND ja immer gleich ist :)

    Spoiler anzeigen
    [autoit]

    #include <GUIComboBox.au3>

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

    Opt('MustDeclareVars', 1)

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

    $Debug_CB = False ; Check ClassName being passed to ComboBox/ComboBoxEx functions, set to True and use a handle to another control to see it work

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

    Global $hCombo

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

    Example_Internal()
    Example_External()

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

    Func Example_Internal()
    Local $hGUI

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

    ; Create GUI
    $hGUI = GUICreate("(Internal) ComboBox Auto Complete", 400, 296)
    $hCombo = GUICtrlCreateCombo("", 2, 2, 396, 296)
    GUISetState()

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

    ; Add files
    _GUICtrlComboBox_BeginUpdate ($hCombo)
    _GUICtrlComboBox_AddDir ($hCombo, @WindowsDir & "\*.exe")
    _GUICtrlComboBox_EndUpdate ($hCombo)

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

    GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")

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

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
    EndFunc ;==>Example_Internal

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

    Func _Edit_Changed()
    _GUICtrlComboBox_AutoComplete ($hCombo)
    EndFunc ;==>_Edit_Changed

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

    Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam)
    Local $hWndFrom, $iIDFrom, $iCode, $hWndCombo
    If Not IsHWnd($hCombo) Then $hWndCombo = GUICtrlGetHandle($hCombo)
    $hWndFrom = $ilParam
    $iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word
    $iCode = BitShift($iwParam, 16) ; Hi Word
    Switch $hWndFrom
    Case $hCombo, $hWndCombo
    Switch $iCode
    Case $CBN_CLOSEUP ; Sent when the list box of a combo box has been closed
    _DebugPrint("$CBN_CLOSEUP" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    Case $CBN_DBLCLK ; Sent when the user double-clicks a string in the list box of a combo box
    _DebugPrint("$CBN_DBLCLK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    Case $CBN_DROPDOWN ; Sent when the list box of a combo box is about to be made visible
    GUICtrlSetData($hCombo, "|TEST")
    _DebugPrint("$CBN_DROPDOWN" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    Case $CBN_EDITCHANGE ; Sent after the user has taken an action that may have altered the text in the edit control portion of a combo box
    _DebugPrint("$CBN_EDITCHANGE" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    _Edit_Changed()
    ; no return value
    Case $CBN_EDITUPDATE ; Sent when the edit control portion of a combo box is about to display altered text
    _DebugPrint("$CBN_EDITUPDATE" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    Case $CBN_ERRSPACE ; Sent when a combo box cannot allocate enough memory to meet a specific request
    _DebugPrint("$CBN_ERRSPACE" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    Case $CBN_KILLFOCUS ; Sent when a combo box loses the keyboard focus
    _DebugPrint("$CBN_KILLFOCUS" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    Case $CBN_SELCHANGE ; Sent when the user changes the current selection in the list box of a combo box
    _DebugPrint("$CBN_SELCHANGE" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    Case $CBN_SELENDCANCEL ; Sent when the user selects an item, but then selects another control or closes the dialog box
    _DebugPrint("$CBN_SELENDCANCEL" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    Case $CBN_SELENDOK ; Sent when the user selects a list item, or selects an item and then closes the list
    _DebugPrint("$CBN_SELENDOK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    Case $CBN_SETFOCUS ; Sent when a combo box receives the keyboard focus
    _DebugPrint("$CBN_SETFOCUS" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_COMMAND

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

    Func _DebugPrint($s_text, $line = @ScriptLineNumber)
    ConsoleWrite( _
    "!===========================================================" & @LF & _
    "+======================================================" & @LF & _
    "-->Line(" & StringFormat("%04d", $line) & "):" & @TAB & $s_text & @LF & _
    "+======================================================" & @LF)
    EndFunc ;==>_DebugPrint

    [/autoit]
  • Die schnelligkeit von GUICtrlSetData

    • FireFlyer
    • 22. Mai 2008 um 22:26

    Moin moin,

    also zu erklärung, ich habe ein relativ großes script das ähnlich wie eine Exeltabelle aufgebaut ist also mit zeilen und spalten, jede Zelle ist ein Input bzw. eine Combobox, so am anfang hatte ich nur inputs wenn man da eine Datei geöffnet hatte ging das alles relativ schnell. Seitdem ich ein paar Spalten als Combobox gemacht habe dauert das oeffnen einer datei 3-4 sekunden länger, liegt das einfach an dem größeren String? Denn bei der Combobox kommen ja z.B. alle Namen aus der Datenbank rein und nur der Name der dann stehen soll kommt halt als default... kennt man ja :)
    Beim öffnen des Programmes habe ich die ganze sache schon optimiert... :) :
    Will da jetzt nicht den ganzen Code reinmachen aber kurz, ich habe mir den WM_Command zu nutze gemacht mit CBS_DROPDOWN d.h. jedes mal wenn dieses "signal" eines Dropdowns kommt wird die Entsprechende ComboBox gefüllt, da das aber bei dem öffnen einer datei nicht funktioniert ist wohl klar, also meine Frage an euch: Habe ich irgendwelche Alternativen um das ganze auf Geschwindigkeit zu optimieren?

    THX 4 all help :D

  • OnEventMode - Während dem Durchlaufen einer Schleife inerhalb einer mit OnEvent aufgerufenen Funktion soll das Script beendet werden

    • FireFlyer
    • 13. Mai 2008 um 23:09

    joar entweder mit hotkey der dann einen exitloop bzw. deine 2. funktion aufruft oder in deiner jetztigen schleife eine _IsPressed Key abfrage machen... ;)

  • Fehler bei in Datei schreiben

    • FireFlyer
    • 12. Mai 2008 um 01:30
    [autoit]

    $lastnumber = Ubound($heimatsystem)-1

    [/autoit]

    Allerdings ist in der Function: "los" $lastnumber als Pararmeter definiert... das solltest du dann rausmachen und mein beispiel von oben unter das _IE_table write to array machen ;). Aber halt wirklich nur wenn das die letzte Zeile der Tabelle sein muss ... keine ahnung davon weiss ich zu wenig über dein skript wenn du anstatt "-1" "-2" nimmst bekommst hast du die vorletzte zeile usw ;)

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™