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. funkey

Beiträge von funkey

  • dynamisch farbiger Spalteninhalt im Listview

    • funkey
    • 15. Januar 2009 um 08:07

    Du kannst dir auch sicher eine Funktion daraus erstellen. Die ganze Zeile einfärben ist am einfachsten:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>

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

    $Form1 = GUICreate("Form1", 195, 123, 339, 251)
    $ListView1 = GUICtrlCreateListView("Server|Status", 8, 8, 177, 105)
    GUICtrlSendMsg(-1, 0x101E, 0, 50)
    GUICtrlSendMsg(-1, 0x101E, 1, 50)
    $ListView1_0 = GUICtrlCreateListViewItem("Server1|online", $ListView1)
    If StringInStr (GUICtrlRead($ListView1_0), 'offline') Then
    GUICtrlSetBkColor(-1, 0xff0000)
    Else
    GUICtrlSetBkColor(-1, 0x00ff00)
    EndIf
    $ListView1_1 = GUICtrlCreateListViewItem("Server2|online", $ListView1)
    If StringInStr (GUICtrlRead($ListView1_1), 'offline') Then
    GUICtrlSetBkColor(-1, 0xff0000)
    Else
    GUICtrlSetBkColor(-1, 0x00ff00)
    EndIf
    $ListView1_2 = GUICtrlCreateListViewItem("Server3|offline", $ListView1)
    If StringInStr (GUICtrlRead($ListView1_2), 'offline') Then
    GUICtrlSetBkColor(-1, 0xff0000)
    Else
    GUICtrlSetBkColor(-1, 0x00ff00)
    EndIf
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]
  • Fenster schließen ?

    • funkey
    • 15. Januar 2009 um 06:55
    Zitat von Dino

    Habe an dieser Stelle den Code an der falsche Stelle eingefügt:

    [autoit]

    ;~ Ende der Deinstallation
    ;~ ####################################################################

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

    ShellExecute(@ScriptDir & "\TriCAD\Disk1\Setup.exe")

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

    If WinExists("Wählen Sie eine Setup-Sprache aus","Wählen Sie die Sprache") Then
    ControlClick("Wählen Sie eine Setup-Sprache aus", "","Button1")
    EndIf
    ExitLoop
    EndIf

    [/autoit]

    Du solltest anstelle des WinExists mal WinWait (mit Timeout) verwenden, da ja nicht sofort nach dem Programmstart das Fenster schon da ist, also geht der Controlclick ins Leere ;)

    Wenn das Sprachauswahlfenster optional ist (so sieht es bei dir zumindest aus), dann:

    [autoit]

    ;~ Ende der Deinstallation
    ;~ ####################################################################

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

    ShellExecute(@ScriptDir & "\TriCAD\Disk1\Setup.exe")

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

    If WinWait("Wählen Sie eine Setup-Sprache aus", "Wählen Sie die Sprache", 3) Then
    ControlClick("Wählen Sie eine Setup-Sprache aus", "", "Button1")
    EndIf

    [/autoit]


    Wenn das Fenster immer angezeigt wird (so wird es sein ;)), dann:

    [autoit]

    ;~ Ende der Deinstallation
    ;~ ####################################################################

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

    ShellExecute(@ScriptDir & "\TriCAD\Disk1\Setup.exe")

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

    WinWait("Wählen Sie eine Setup-Sprache aus", "Wählen Sie die Sprache")
    ControlClick("Wählen Sie eine Setup-Sprache aus", "", "Button1")

    [/autoit]
  • Excel-Datei nach und nach füllen

    • funkey
    • 14. Januar 2009 um 11:20

    Dann würde ich mal auf Version 3.3.0.0. updaten ;)

  • Excel-Datei nach und nach füllen

    • funkey
    • 14. Januar 2009 um 10:51

    Es gibt eine Excel-UDF

    Beispiel
    [autoit]

    #include <Date.au3>
    #include <Excel.au3>

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

    $time = TimerInit()
    $FileName= "C:\TestKSC.xls"

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

    $oExcel = _ExcelbookNew()
    _ExcelSheetAddNew($oExcel, "dlhacker")

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

    $x = 2 ; Zeile
    $y = 2
    $z = 2
    $l = 2 ; Spalte
    $m = 3
    $n = 4

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

    For $i = 1 To 10
    $dif = TimerDiff ($time)
    _ExcelWriteCell($oExcel, _NowDate(), $x, $l)
    _ExcelWriteCell($oExcel, _NowTime(), $y, $m)
    _ExcelWriteCell($oExcel, "'"&StringFormat ("%.2f", $dif / 1000), $z,$n)
    $x = $x + 1
    $y = $y + 1
    $z = $z + 1
    Next

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

    Sleep(2000)

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

    _ExcelBookSaveAs($oExcel, "C:\TestKSC.xls", "xls")
    _ExcelBookClose($oExcel)

    [/autoit]
  • Probleme mit "Run()" und "Runwait()"

    • funkey
    • 14. Januar 2009 um 10:17

    Also bei mir gehts so:

    [autoit]

    ShellExecute('test.jar', '-a 78 -b 83 eingabe.txt')

    [/autoit]
  • Ist es zu schwer oder was? Matrix The Game

    • funkey
    • 13. Januar 2009 um 11:06

    Ich finde es nicht zu schwer. Ein Spiel soll ein Herausforderung sein. In Level 6 ist der letzte Buchstabe falsch. Ist das Absicht?

    Hier noch eine kleine Hilfe, die ich mir gemacht habe:

    [autoit]

    Local $Text
    For $i = 1 To 26
    $Text &= $i&" : "&Chr($i + 96)&@CRLF
    Next
    MsgBox(0,"Matrix", $Text)

    [/autoit]
  • Quellcode für SciTE4AutoIt3 oder wie bau ich SciTE um das er so auschaut wie der SciTE4AutoIt3 Editor

    • funkey
    • 13. Januar 2009 um 09:57

    Vielleicht hilft dir das?
    [ offen ] Syntaxhighlighting bei eigener Funktion mit Scite
    SciTE - Möglichkeiten nutzen
    Variablendeklaration automatisiert - Opt("MustDeclareVars", 1) Post2

  • Button mag das bild nich :)

    • funkey
    • 13. Januar 2009 um 09:48
    Beispiel aus der Hilfe zu GuiCtrlSetImage ;)
    [autoit]

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

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

    Opt('MustDeclareVars', 1)

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

    Example()

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

    Func Example()
    Local $msg

    GUICreate("My GUI") ; will create a dialog box that when displayed is centered

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

    GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON)
    GUICtrlSetImage(-1, "shell32.dll", 22)

    GUISetState()

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

    ; Run the GUI until the dialog is closed
    While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    EndFunc ;==>Example

    [/autoit]
  • Fragen zur Mauskontrolle ;)

    • funkey
    • 13. Januar 2009 um 09:42
    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include <IE.au3>

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

    $Embedded = _IECreateEmbedded()
    $1 = 'http://google.de'

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

    $Form1 = GUICreate("Form1", 1053, 751, -1, -1)
    GUICtrlCreateObj($Embedded, 24, 16, 1006, 607)
    $Group1 = GUICtrlCreateGroup("XD", 24, 632, 305, 113)
    $mobx = GUICtrlCreateInput("0", 32, 656, 89, 21)
    $moby = GUICtrlCreateInput("0", 127, 656, 89, 21)
    $fightx = GUICtrlCreateInput("0", 32, 683, 89, 21)
    $fighty = GUICtrlCreateInput("0", 127, 683, 89, 21)
    $Label1 = GUICtrlCreateLabel("Mob - Pos.", 224, 657, 55, 17)
    $Label2 = GUICtrlCreateLabel("Fight - Pos.", 224, 687, 57, 17)
    $Label3 = GUICtrlCreateLabel("1", 288, 652, 15, 28)
    GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
    $Label4 = GUICtrlCreateLabel("2", 288, 680, 15, 28)
    GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
    $aoex = GUICtrlCreateInput("0", 32, 721, 89, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $aoey = GUICtrlCreateInput("0", 127, 721, 89, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label5 = GUICtrlCreateLabel("AoE - Pos.", 224, 722, 54, 17)
    $Label6 = GUICtrlCreateLabel("3", 288, 715, 15, 28)
    GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
    $CheckAOE = GUICtrlCreateCheckbox("AoE - Enable ?", 64, 704, 97, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)

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

    $shopbu = GUICtrlCreateButton("Shop", 344, 656, 41, 17, 0)
    $eqbu = GUICtrlCreateButton("Equip", 389, 656, 41, 17, 0)
    $statbu = GUICtrlCreateButton("Stats", 344, 676, 41, 17, 0)
    $upbu = GUICtrlCreateButton("Upgrade", 389, 676, 41, 17, 0)
    GUICtrlSetFont(-1, 7, 400, 0, "MS Sans Serif")
    $Group2 = GUICtrlCreateGroup("Killed Mobs", 352, 696, 73, 49)
    $Label7 = GUICtrlCreateLabel("0", 384, 720, 10, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group3 = GUICtrlCreateGroup("Area", 448, 640, 177, 105)
    $Check160 = GUICtrlCreateCheckbox("", 456, 664, 17, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Check61120 = GUICtrlCreateCheckbox("", 456, 688, 17, 17)
    $bu160 = GUICtrlCreateButton("1 - 60 Mobs", 472, 664, 81, 17, 0)
    $bu61120 = GUICtrlCreateButton("61 - 120 Mobs", 472, 688, 81, 17, 0)
    $scrollbu = GUICtrlCreateButton("Scroll", 560, 656, 57, 49, 0)
    $CheckSCROLL = GUICtrlCreateCheckbox("Scrolling ?", 488, 720, 97, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Start = GUICtrlCreateButton("Start", 640, 648, 137, 97, 0)
    GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
    $Stop = GUICtrlCreateButton("Stop", 786, 648, 137, 97, 0)
    GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
    $Save = GUICtrlCreateButton("Save Options", 936, 648, 97, 33, 0)
    $Logout = GUICtrlCreateButton("Logout", 936, 681, 97, 33, 0)
    $PageStart = GUICtrlCreateButton("Start Page", 936, 714, 97, 33, 0)
    $POS = GUICtrlCreateLabel("X x Y", 360, 632, 60, 17)

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

    GUISetState(@SW_SHOW)

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

    _IENavigate($Embedded, $1)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $POS
    Sleep(2000)
    MouseMove(StringLeft(GUICtrlRead($POS), StringInStr(GUICtrlRead($POS), " ") - 1), StringMid(GUICtrlRead($POS), StringInStr(GUICtrlRead($POS), "x") + 2))
    Case $Start
    _IENavigate($Embedded, $1)
    Sleep(1000)
    MouseMove(GUICtrlRead($mobx), GUICtrlRead($moby), 20)
    Sleep(300)
    MouseMove(GUICtrlRead($fightx), GUICtrlRead($fighty), 20)
    Sleep(300)
    EndSwitch
    GUICtrlSetData($POS, MouseGetPos(0) & " x " & MouseGetPos(1))
    WEnd

    [/autoit]
  • Drucken

    • funkey
    • 13. Januar 2009 um 09:09
    [autoit]

    Run(@ComSpec & " /c " & 'copy /b "'&$Dateiname_mit_Pfad&'" LPT1', "", @SW_HIDE)

    [/autoit]
  • Daten-Löscher

    • funkey
    • 12. Januar 2009 um 11:39

    Zumindest sowas ähnliches wie Gutmann: Securely overwrite files

    Wikipedia

  • Code zum einloggen

    • funkey
    • 11. Januar 2009 um 20:20

    Such mal nach folgenden Befehlen:

    [autoit]

    _IECreate
    _IEFormGetCollection
    _IEFormElementGetObjByName
    _IEFormElementSetValue
    _IEFormSubmit

    [/autoit]

    Der Code hängt ganz von der Seite ab wo du dich einloggen willst.
    Ich bin sicher, dass du fündig wirst.

  • zip-Datei downloaden und nach C: entpacken

    • funkey
    • 10. Januar 2009 um 01:12

    C:Programme\World of Warcraft\Interface\AddOns\CharakterProfiler <-- Da fehlt überall ein Backslash. Außerdem muss das Spiel in diesem Ordner installiert sein! Ist das immer der Fall? Ansonsten über Registry auslesen.

    DirRemove("C:\MoonRoster" 1) <-- Da fehlt ein Beistrich ;)


    Zitat von Raupi

    Probier es doch einfach aus. Wie sollen wir das jetzt nachprüfen ?

    Genau das wollte ich auch sagen ;_)

  • Multiplayer-Game 'Kurven-Spiel'

    • funkey
    • 9. Januar 2009 um 23:17
    Zitat von Padmak

    in der version 1.2 ist des bei mir total langsam


    Bei mir sind alle Versionen gleich schnell.
    Du kannst aber in Zeile 248 den Parameter $Len anpassen, das ist die Geschwindigkeit!
    Kann sein, dass du dann auch den Parameter $Winkelweite verändern musst, damit du engere Kurven fahren kannst.

    [autoit]

    Func _DrawLine_Angle(ByRef $aPos_x, ByRef $a_Pos_y, $Angle, $hPen, $Len = 5) ; Stell mal $Len z.B. auf 10 ;)

    [/autoit]


    Zitat von $User

    ich würde sowas auch gerne können


    Meiner Meinung nach war das überhaupt nicht schwierig!
    Ich selber hatte es mir viel schwieriger vorgestellt, aber ich habe nur eineinhalb Tage dafür gebraucht.
    Man muss sich nur ein bisschen mit den GDI+ Befehlen beschäftigen, dann noch _IsPressed, eine schwarze toplevel Gui und schon ist man fertig.
    Das kann man relativ schnell lernen, am wichtigsten ist nur, dass man eine gute Idee für ein Projekt hat.

    Nochmals danke für das Lob!!

  • ControlSend über user32.dll / Win_API

    • funkey
    • 9. Januar 2009 um 02:45

    _SendMessage benutzt auch die User32.dll

    Spoiler anzeigen
    [autoit]

    #include <sendmessage.au3>
    #include <windowsconstants.au3>

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

    $pid=Run("notepad")
    WinWait("[CLASS:Notepad]")
    WinActivate("[CLASS:Notepad]")
    $controlhwnd=ControlGetHandle("[CLASS:Notepad]","","[CLASS:Edit]")

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

    For $i=0x20 To 0x39
    _SendMessage($controlhwnd,$WM_CHAR,$i)
    Next

    [/autoit]
  • Eingabe verschlüsseln

    • funkey
    • 9. Januar 2009 um 00:49

    Du musst folgende Datei includen:

    [autoit]

    #include <EditConstants.au3>

    [/autoit]


    Oder du schreibst an der Stelle der Variable 0x0020

  • Eingabe verschlüsseln

    • funkey
    • 9. Januar 2009 um 00:44
    [autoit]

    $Input2 = GUICtrlCreateInput($loginpw, 136, 120, 193, 21, $ES_PASSWORD)

    [/autoit]
  • ControlSend über user32.dll / Win_API

    • funkey
    • 9. Januar 2009 um 00:34

    Hast du ControlSetText schon probiert. Das ist in bestimmten Fällen besser als ControlSend.

  • Automatisches Ausführen eines Programmms

    • funkey
    • 8. Januar 2009 um 16:59

    Entweder

    [autoit]

    RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "MyProgramName", "REG_SZ", @ScriptFullPath)

    [/autoit]


    oder

    [autoit]

    FileCreateShortcut(@ScriptFullPath, @StartupCommonDir & "\MyProgramName.lnk")

    [/autoit]
  • Frage zu einem Beispiel aus der Hilfe

    • funkey
    • 8. Januar 2009 um 02:16

    Blödes Beispiel aus der Hilfe:D

    Beide Befehle sind in diesem Skript eigentlich überflüssig.
    Sie wurden meiner Meinung nach nur benutzt damit es schöner aussieht.

    Aber wenn aus irgendeinem Grund das Erstellen des Traymenüs länger dauern würde, dann könnte man ein unvollständiges Menü zu Gesicht bekommen, wenn das Icon von Anfang an sichtbar wäre (rein theoretisch ;) )

    ContinueLoop ist in diesem Beispiel nur als Platzhalter verwendet, da nach dem EndSelect kein Befehl mehr kommt, wäre das aber der Fall, dann würde dieser übersprungen werden, so wie hier:

    [autoit]

    ;Print all numbers from 1 to 10 except number 7
    For $i = 1 to 10
    If $i = 7 Then ContinueLoop
    MsgBox(0, "The value of $i is:", $i)
    Next

    [/autoit]

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™