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

Beiträge von AutoTim

  • Buch

    • AutoTim
    • 23. August 2010 um 23:38

    Nein, ich denke das war ein anderes. Ich habe es gelb in Erinnerung.

    lg Tim

  • Buch

    • AutoTim
    • 23. August 2010 um 18:25

    Gibt es das buch noch wo ?

    lg Tim

  • _IOWWrite <- Funktioniert super == aber Hilfe bei _IOWRead

    • AutoTim
    • 23. August 2010 um 16:44

    Hey, also ich habe nun 1 Monat mit der Schreib Funktion meines Warriors vertraut gemacht. Nun möchte ich gerne noch Daten Auslesen. Ich habe ein kleines Problem, weil ich nicht weiß welchen Wert der &Report bekomme. Mein Script sieht wie folgt aus, und schreibt auch die Daten an meinen Warrior. Doch ab dem Lesen, geht es nicht mehr weiter. Ich bin mir ziemlich sicher, das bei dem lesen etwa snicht stimmt. Aber ich begreife nicht weis bei dem Report rein soll. Beimn Schreiben ist es der Wert. OK. aber beim Lesen ?

    lg Tim

    Spoiler anzeigen
    [autoit]

    #include "iowkit.au3"
    #Include <WinAPI.au3>

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

    Global $ahIOW[$IOWKIT_MAX_DEVICES]

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

    If Not _IowKitStartUp() Then ; Die Dll wird geladen
    ConsoleWrite("Failed to load iowkit dll" & @CRLF)
    Exit
    EndIf

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

    ; Open device
    Global $devHandle = _IowKitOpenDevice() ; Die Verbindung zum Warrior wird hergestellt
    If Not $devHandle Then
    ConsoleWrite("Failed to open device" & @CRLF)
    _IowKitCloseDevice($devHandle);
    Exit
    EndIf
    ConsoleWrite("Device Opened" & @CRLF)

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

    ; Get number of IOWs in system
    $numIows = _IowKitGetNumDevs() ; Gibt die Anzahl an IOW´s im System wider
    ConsoleWrite(StringFormat("%d IOWs in system\n", $numIows))
    ; Get all IOW handles
    Dim $serial ; Variable wird deklariert

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

    For $i = 1 To $numIows
    ;~ ConsoleWrite("+Loop " & $i & '/' & $numIows & @CRLF)
    ; Get device handle and init object
    $ahIOW[$i-1] = _IowKitGetDeviceHandle($i) ; Gibt ein Handle für einen der IOW´s zurück
    ;~ ConsoleWrite("-after _IowKitGetDeviceHandle" & @CRLF)
    ; Get serial number
    _IowKitGetSerialNumber($ahIOW[$i-1], $serial); Schreibt die Seriennummer in einen buffer ( serial )
    ;~ ConsoleWrite("-after _IowKitGetSerialNumber" & @CRLF)
    $pid = _IowKitGetProductId($ahIOW[$i-1]) ; Gibt die Produkt ID des IOW´s zurück. Bei den 40ern ist es meist die 1500
    ConsoleWrite(StringFormat('%d PID %x, S/N "%s"\n', $i, $pid, $serial));

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

    $tIOWKIT40_IO_REPORT = DLLStructCreate($tagIOWKIT40_IO_REPORT) ; korrekt
    DLLStructSetData($tIOWKIT40_IO_REPORT, "Value", 0x0FFFFFFF ) ; hier war was falsch
    $write = _IowKitWrite($ahIOW[$i-1], $IOW_PIPE_IO_PINS, DLLStructGetPtr($tIOWKIT40_IO_REPORT) , $IOWKIT40_IO_REPORT_SIZE) ; Würde ich so machen, die UDF sollte aber auch deine Version erlauben

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

    If Not ($write = $IOWKIT40_IO_REPORT_SIZE) Then ; Klammern nicht vergessen. Not bindet stärker als der Vergleich
    ConsoleWrite("Fail to send Data to IOW " & $serial & @CRLF)
    ;~ _IowKitCloseDevice($devHandle);
    Exit
    EndIf

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

    Next

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

    For $i = 1 To $numIows
    ;~ ConsoleWrite("+Loop " & $i & '/' & $numIows & @CRLF)
    ; Get device handle and init object
    $ahIOW[$i-1] = _IowKitGetDeviceHandle($i) ; Gibt ein Handle für einen der IOW´s zurück
    ;~ ConsoleWrite("-after _IowKitGetDeviceHandle" & @CRLF)
    ; Get serial number
    _IowKitGetSerialNumber($ahIOW[$i-1], $serial); Schreibt die Seriennummer in einen buffer ( serial )
    ;~ ConsoleWrite("-after _IowKitGetSerialNumber" & @CRLF)
    $pid = _IowKitGetProductId($ahIOW[$i-1]) ; Gibt die Produkt ID des IOW´s zurück. Bei den 40ern ist es meist die 1500
    ConsoleWrite(StringFormat('%d PID %x, S/N "%s"\n', $i, $pid, $serial));

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

    ; Hier muss irgendetwas fehlen...
    $res = _IowKitRead($ahIOW[$i-1], $IOW_PIPE_IO_PINS, $IOWKIT40_IO_REPORT, $IOWKIT40_IO_REPORT_SIZE)
    ConsoleWrite($res, $IOWKIT40_IO_REPORT)

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

    If Not ($res = $IOWKIT40_IO_REPORT_SIZE) Then ; Klammern nicht vergessen. Not bindet stärker als der Vergleich
    ConsoleWrite("Fail to read Data from IOW " & $serial & @CRLF)
    ;~ _IowKitCloseDevice($devHandle);
    Exit
    EndIf

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

    Next

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

    ; Close device
    _IowKitCloseDevice($devHandle);
    ConsoleWrite("Device closed" & @CRLF)

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

    Hier noch der Ausschnitt aus der .pdf :

    Spoiler anzeigen

    IowKitRead
    Declaration:
    ULONG IOWKIT_API IowKitRead(IOWKIT_HANDLE devHandle, ULONG numPipe,
    PCHAR buffer, ULONG length);
    function IowKitRead(devHandle: IOWKIT_HANDLE; numPipe: ULONG;
    buffer: PChar; length: ULONG): ULONG; stdcall;
    Read data from IO-Warrior.
    This function reads length bytes from IO-Warrior and returns the number of bytes read if successful.
    Note that you must specify the number of the pipe (see IO-Warrior specs) to read from. numPipe ranges
    from 0 to IOWKIT_MAX_PIPES-1.
    Since the IO-Warriors are HID devices, you can only read the data in chunks called reports. Each report is
    preceded by a ReportID byte. The "IOWarriorDatasheet.pdf" elaborates about that.
    The function returns the number of bytes read, so you should always check if it reads the correct number
    of bytes, you can use GetLastError() to get error details. Keep in mind that data is always returned
    in report chunks, so reading 5 bytes from the IO-pins of an IO-Warrior 24 would only return 3 bytes of
    data because the IO-Warrior 24 has a 3 byte report whereas an IO-Warrior 40 has a 5 byte report.
    The Special Mode pipe has a report size of 8 bytes for all IO-Warriors.
    Linux does not have a ReportID byte of 0 for pipe 0 (I/O pins). To be completely compatible with
    Windows libiowkit.so adds that ReportID to the data.
    As of dynamic library version 1.4 and later the function correctly reads several reports at once.
    ATTENTION!
    This function blocks the current thread until something changes on IO-Warrior (i.e. until user presses a
    button connected to an input pin, or until IIC data arrives), so if you do not want your program to be
    blocked you should use a separate thread for reading from IO-Warrior. If you do not want a blocking read
    use IowKitReadNonBlocking().
    Alternatively you can set the read timeout with IowKitSetTimeout() to force IowKitRead() to
    fail when the timeout elapsed.
    Sample usage C:
    IOWKIT40_IO_REPORT report;
    ULONG res;
    // Read IO pins of IO-Warrior 40
    res = IowKitRead(ioHandle, IOW_PIPE_IO_PINS,
    &report, IOWKIT40_IO_REPORT_SIZE);
    if (res != IOWKIT40_IO_REPORT_SIZE)
    {
    // Didn't read, handle error
    ...
    }

    Ich habe gelesen, das man may_pipes auf -1 setzten muss zum lesen. Aber bitte wo geht das, oder wo finde ich wie es geht ?

    lg Tim

  • Google Earth macht auch mal Fehler

    • AutoTim
    • 23. August 2010 um 16:38

    Ich finde es genial :)

  • Maple Desktop

    • AutoTim
    • 16. August 2010 um 21:27

    6GB DDR3-Ram 1333 Mhz

    lg Tim

  • DialogOpen

    • AutoTim
    • 16. August 2010 um 18:29

    BIG THX

  • DialogOpen

    • AutoTim
    • 16. August 2010 um 17:41

    Noch eine Kleinigkeit. wie bekomme ich es hin, wenn die Msgbox das Nein bekommt, das dann MunüItem 5 aufgerufen wird ? Am besten Ohne Funktion:

    Spoiler anzeigen
    [autoit]

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    $magboxschliesenantwort = Msgbox(36,"Ohne speichern beenden ?!","Möchten sie Ihr Projekt ohne speichern beenden ?")
    If $magboxschliesenantwort = 7 Then GUICtrlSetData($Edit1, "=> Dann bitte speichern !"&@CRLF, 1) ; Nein
    If $magboxschliesenantwort = 6 Then Exit ; Ja

    Case $MenuItem5
    $fileopendialog = FileOpenDialog("Projekt öffnen", @DesktopDir, "INI-Datei (*.ini;)", 1) ; Öffnen Dialog
    If @error Then
    GUICtrlSetData($Edit1, "=> Das Projekt konnte nicht geöffnet werden!"&@CRLF, 1)
    else
    If StringRight($fileopendialog, 4) <> ".ini" Then $fileopendialog &= ".ini" ; wenn kein .ini dann .ini

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

    For $i = 0 To 43
    $var = IniRead($fileopendialog, $i, "Input", 1000)
    ;~ msgbox(0,"",$var)
    GUICtrlSetData(($Inputport[$i]), $var)
    Next
    GUICtrlSetData($Edit1, "=> Projekt wurde geöffnet! -> "& $fileopendialog &@CRLF ,1)
    EndIf


    Case $MenuItem4
    $filesavedialog = FileSaveDialog("Projekt speichern", @DesktopDir, "INI-Datei (*.ini)", 16) ;Speichern Dialog
    If @error Then
    GUICtrlSetData($Edit1, "=> Projekt konnte nicht gespeichert werden!"&@CRLF ,1)
    else
    If StringRight($filesavedialog, 4) <> ".ini" Then $filesavedialog &= ".ini" ; wenn kein .ini dann .ini

    For $i = 0 To 43
    IniWrite($filesavedialog, $i, "Input", GUICtrlRead($Inputport[$i])) ; Ini beschrieben
    Next
    GUICtrlSetData($Edit1, "=> Projekt wurde gespeichert! -> "& $filesavedialog &@CRLF ,1)
    EndIf
    Case $MenuItem7
    Exit
    EndSwitch
    WEnd

    [/autoit]
  • DialogOpen

    • AutoTim
    • 16. August 2010 um 17:26

    Ok, Danke, das letzte steht ;)
    Vielen Dank euch allen ;) Manchmal ist die Lösung so einfach ;)

    lg Tim

  • DialogOpen

    • AutoTim
    • 16. August 2010 um 15:13

    Wenn ich bei Folgendem Abschnitt meiner Gui, das FileOpen Fenster schließe, hängt sich meine Gui auf. Was bekomme ich denn zurück, wenn ich das Fenster schließe ? Ich habe in der Hilfe nicht gefunden

    Spoiler anzeigen
    [autoit]

    Case $MenuItem5
    $fileopendialog = FileOpenDialog("Projekt öffnen", @DesktopDir, "INI-Datei (*.ini;)", 1) ; Öffnen Dialog
    If @error Then ExitLoop MsgBox(0, "", "Abbruch durch Benutzer") ; Nach error Fragen
    If StringRight($fileopendialog, 4) <> ".ini" Then $fileopendialog &= ".ini" ; wenn kein .ini dann .ini

    For $i = 0 To 43
    $var = IniRead($fileopendialog, $i, "Input", 1000)
    ;~ msgbox(0,"",$var)
    GUICtrlSetData(($Inputport[$i]),$var)
    Next

    [/autoit]

    lg Tim

    Er darf die For schleife nicht mehr ausführen, wenn ich auf schließen gehe. Mit ExitLoop, beendet er meine Haupt While Schleife.

  • Array hochzählen

    • AutoTim
    • 16. August 2010 um 01:57

    DANKE euch ;)

  • Simples .ini Write Problem

    • AutoTim
    • 16. August 2010 um 01:00

    Danke dir, das ist besser :)

    lg Tim

  • Array hochzählen

    • AutoTim
    • 16. August 2010 um 00:53

    Hallo, ich möchte in meinem Programm gerne die eingegeben Inputs speichern können. Da sgeht über die oprion Speichern. Dann soll er meine Inputs auslesen, und in eine .ini schreiben. So sieht mein Programm aus. Ihr könnt es ja mal probieren. Die beschriebene .ini datei enthällt immer den selben wert. Tragt beim Testen einfach mal die derten 8 Inputs verschiedene Zahlen ein, und versucht es dann zu speichern. Schaut euch dann mal die .ini an. Woran liegt das ?

    Ab Zeile 151 ;)

    Spoiler anzeigen
    [autoit]

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

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


    Local $Inputport[8]
    Local $Inputportread[8]

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

    #Region ### START Koda GUI section ### Form=C:\Users\User\Desktop\Namenlos\Namenlos.kxf
    $Form1 = GUICreate("Namenlos", 1083, 861, 167, 97, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_OVERLAPPEDWINDOW,$WS_TILEDWINDOW,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS))
    $MenuItem2 = GUICtrlCreateMenu("&Optionen")
    $MenuItem3 = GUICtrlCreateMenuItem("Über", $MenuItem2)
    $MenuItem11 = GUICtrlCreateMenuItem("", $MenuItem2)
    $MenuItem4 = GUICtrlCreateMenuItem("Speichern", $MenuItem2)
    $MenuItem5 = GUICtrlCreateMenuItem("Öffnen", $MenuItem2)
    $MenuItem6 = GUICtrlCreateMenuItem("", $MenuItem2)
    $MenuItem7 = GUICtrlCreateMenuItem("Schließen ohne speichern", $MenuItem2)
    $MenuItem1 = GUICtrlCreateMenu("&Hex - Tabelle")
    $MenuItem8 = GUICtrlCreateMenu("H&ilfe")
    $Bild1 = GUICtrlCreatePic("", 726, 16, 337, 129, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $Button1 = GUICtrlCreateButton("Effect 2", 32, 296, 97, 41, $WS_GROUP)
    $Button2 = GUICtrlCreateButton("Effect 5", 32, 488, 97, 41, $WS_GROUP)
    $Button3 = GUICtrlCreateButton("Effect 6", 32, 552, 97, 41, $WS_GROUP)
    $Button4 = GUICtrlCreateButton("Effect 8", 32, 680, 97, 41, $WS_GROUP)
    $Button5 = GUICtrlCreateButton("Effect 1", 32, 232, 97, 41, $WS_GROUP)
    $Button6 = GUICtrlCreateButton("Effect 4", 32, 424, 97, 41, $WS_GROUP)
    $Button7 = GUICtrlCreateButton("Effect 3", 32, 360, 97, 41, $WS_GROUP)
    $Button8 = GUICtrlCreateButton("Effect 7", 32, 616, 97, 41, $WS_GROUP)
    $Group1 = GUICtrlCreateGroup("Port 1", 16, 192, 257, 537)
    $Inputport[1.1] = GUICtrlCreateInput("1000", 144, 240, 113, 21)
    $Inputport[1.2] = GUICtrlCreateInput("1000", 144, 304, 113, 21)
    $Inputport[1.3] = GUICtrlCreateInput("1000", 144, 368, 113, 21)
    $Inputport[1.4] = GUICtrlCreateInput("1000", 144, 624, 113, 21)
    $Inputport[1.5] = GUICtrlCreateInput("1000", 144, 688, 113, 21)
    $Inputport[1.6] = GUICtrlCreateInput("1000", 144, 432, 113, 21)
    $Inputport[1.7] = GUICtrlCreateInput("1000", 144, 560, 113, 21)
    $Inputport[1.8] = GUICtrlCreateInput("1000", 144, 496, 113, 21)
    $Label1 = GUICtrlCreateLabel("Dauer", 160, 200, 89, 31)
    GUICtrlSetFont(-1, 18, 800, 0, "Broadway")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Port 2", 288, 192, 257, 537)
    $Input9 = GUICtrlCreateInput("1000", 416, 240, 113, 21)
    $Input10 = GUICtrlCreateInput("1000", 416, 304, 113, 21)
    $Input11 = GUICtrlCreateInput("1000", 416, 368, 113, 21)
    $Input12 = GUICtrlCreateInput("1000", 416, 624, 113, 21)
    $Input13 = GUICtrlCreateInput("1000", 416, 688, 113, 21)
    $Input14 = GUICtrlCreateInput("1000", 416, 432, 113, 21)
    $Input15 = GUICtrlCreateInput("1000", 416, 560, 113, 21)
    $Input16 = GUICtrlCreateInput("1000", 416, 496, 113, 21)
    $Label2 = GUICtrlCreateLabel("Dauer", 432, 200, 89, 31)
    GUICtrlSetFont(-1, 18, 800, 0, "Broadway")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Button9 = GUICtrlCreateButton("Effect 2", 304, 296, 97, 41, $WS_GROUP)
    $Button10 = GUICtrlCreateButton("Effect 5", 304, 488, 97, 41, $WS_GROUP)
    $Button11 = GUICtrlCreateButton("Effect 6", 304, 552, 97, 41, $WS_GROUP)
    $Button12 = GUICtrlCreateButton("Effect 8", 304, 680, 97, 41, $WS_GROUP)
    $Button13 = GUICtrlCreateButton("Effect 1", 304, 232, 97, 41, $WS_GROUP)
    $Button14 = GUICtrlCreateButton("Effect 4", 304, 424, 97, 41, $WS_GROUP)
    $Button15 = GUICtrlCreateButton("Effect 3", 304, 360, 97, 41, $WS_GROUP)
    $Button16 = GUICtrlCreateButton("Effect 7", 304, 616, 97, 41, $WS_GROUP)
    $Group3 = GUICtrlCreateGroup("Port 3", 552, 192, 257, 537)
    $Input17 = GUICtrlCreateInput("1000", 680, 240, 113, 21)
    $Input18 = GUICtrlCreateInput("1000", 680, 304, 113, 21)
    $Input19 = GUICtrlCreateInput("1000", 680, 368, 113, 21)
    $Input20 = GUICtrlCreateInput("1000", 680, 624, 113, 21)
    $Input21 = GUICtrlCreateInput("1000", 680, 688, 113, 21)
    $Input22 = GUICtrlCreateInput("1000", 680, 432, 113, 21)
    $Input23 = GUICtrlCreateInput("1000", 680, 560, 113, 21)
    $Input24 = GUICtrlCreateInput("1000", 680, 496, 113, 21)
    $Label3 = GUICtrlCreateLabel("Dauer", 696, 200, 89, 31)
    GUICtrlSetFont(-1, 18, 800, 0, "Broadway")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Button17 = GUICtrlCreateButton("Effect 2", 568, 296, 97, 41, $WS_GROUP)
    $Button18 = GUICtrlCreateButton("Effect 5", 568, 488, 97, 41, $WS_GROUP)
    $Button19 = GUICtrlCreateButton("Effect 6", 568, 552, 97, 41, $WS_GROUP)
    $Button20 = GUICtrlCreateButton("Effect 8", 568, 680, 97, 41, $WS_GROUP)
    $Button21 = GUICtrlCreateButton("Effect 1", 568, 232, 97, 41, $WS_GROUP)
    $Button22 = GUICtrlCreateButton("Effect 4", 568, 424, 97, 41, $WS_GROUP)
    $Button23 = GUICtrlCreateButton("Effect 3", 568, 360, 97, 41, $WS_GROUP)
    $Button24 = GUICtrlCreateButton("Effect 7", 568, 616, 97, 41, $WS_GROUP)
    $Group4 = GUICtrlCreateGroup("Port 4", 816, 192, 257, 537)
    $Input25 = GUICtrlCreateInput("1000", 944, 240, 113, 21)
    $Input26 = GUICtrlCreateInput("1000", 944, 304, 113, 21)
    $Input27 = GUICtrlCreateInput("1000", 944, 368, 113, 21)
    $Input28 = GUICtrlCreateInput("1000", 944, 624, 113, 21)
    $Input29 = GUICtrlCreateInput("1000", 944, 688, 113, 21)
    $Input30 = GUICtrlCreateInput("1000", 944, 432, 113, 21)
    $Input31 = GUICtrlCreateInput("1000", 944, 560, 113, 21)
    $Input32 = GUICtrlCreateInput("1000", 944, 496, 113, 21)
    $Label4 = GUICtrlCreateLabel("Dauer", 960, 200, 89, 31)
    GUICtrlSetFont(-1, 18, 800, 0, "Broadway")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Button25 = GUICtrlCreateButton("Effect 2", 832, 296, 97, 41, $WS_GROUP)
    $Button26 = GUICtrlCreateButton("Effect 5", 832, 488, 97, 41, $WS_GROUP)
    $Button27 = GUICtrlCreateButton("Effect 6", 832, 552, 97, 41, $WS_GROUP)
    $Button28 = GUICtrlCreateButton("Effect 8", 832, 680, 97, 41, $WS_GROUP)
    $Button29 = GUICtrlCreateButton("Effect 1", 832, 232, 97, 41, $WS_GROUP)
    $Button30 = GUICtrlCreateButton("Effect 4", 832, 424, 97, 41, $WS_GROUP)
    $Button31 = GUICtrlCreateButton("Effect 3", 832, 360, 97, 41, $WS_GROUP)
    $Button32 = GUICtrlCreateButton("Effect 7", 832, 616, 97, 41, $WS_GROUP)
    $Button33 = GUICtrlCreateButton("Wunsch 1", 24, 24, 97, 41, $WS_GROUP)
    $Button34 = GUICtrlCreateButton("Wunsch 4", 24, 112, 97, 41, $WS_GROUP)
    $Button35 = GUICtrlCreateButton("Wunsch 2", 256, 24, 97, 41, $WS_GROUP)
    $Button36 = GUICtrlCreateButton("Wunsch 5", 256, 112, 97, 41, $WS_GROUP)
    $Button37 = GUICtrlCreateButton("Wunsch 3", 496, 24, 97, 41, $WS_GROUP)
    $Button38 = GUICtrlCreateButton("Wunsch6", 496, 112, 97, 41, $WS_GROUP)
    $inpot = GUICtrlCreateInput("Dauer", 136, 16, 89, 21)
    $Input34 = GUICtrlCreateInput("Hex", 136, 56, 89, 21)
    $Dauer = GUICtrlCreateInput("Dauer", 136, 104, 89, 21)
    $Input36 = GUICtrlCreateInput("Hex", 136, 144, 89, 21)
    $Input37 = GUICtrlCreateInput("Dauer", 368, 16, 89, 21)
    $Input38 = GUICtrlCreateInput("Hex", 368, 56, 89, 21)
    $Input39 = GUICtrlCreateInput("Dauer", 368, 104, 89, 21)
    $Input40 = GUICtrlCreateInput("Hex", 368, 144, 89, 21)
    $Input41 = GUICtrlCreateInput("Dauer", 608, 16, 89, 21)
    $Input42 = GUICtrlCreateInput("Hex", 608, 56, 89, 21)
    $Input43 = GUICtrlCreateInput("Dauer", 608, 104, 89, 21)
    $Input44 = GUICtrlCreateInput("Hex", 608, 144, 89, 21)
    $Group5 = GUICtrlCreateGroup("Wunsch 1", 16, 8, 217, 81)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group6 = GUICtrlCreateGroup("Wunsch 4", 16, 96, 217, 81)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group7 = GUICtrlCreateGroup("Wunsch 2", 248, 8, 217, 81)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group8 = GUICtrlCreateGroup("Wunsch 5", 248, 96, 217, 81)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group9 = GUICtrlCreateGroup("Wunsch 3", 480, 8, 225, 81)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group10 = GUICtrlCreateGroup("Wunsch 6", 480, 96, 225, 81)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Edit1 = GUICtrlCreateEdit("", 16, 744, 1057, 81, BitOR($ES_AUTOVSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_VSCROLL))
    GUICtrlSetData(-1, "Edit1")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1

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

    Switch GUIGetMsg()

    Case $GUI_EVENT_CLOSE
    Exit
    Case $MenuItem5
    $fileopendialog = FileOpenDialog("Projekt öffnen",@DesktopDir,"INI-Datei (*.ini;)",1) ; Öffnen Dialog


    Case $MenuItem4

    $filesavedialog = FileSaveDialog("Projekt speichern",@DesktopDir,"INI-Datei (*.ini;)",16) ;Speichern Dialog

    $Zahl = 1.0 ; Wichtig, das diese hier auf 1.0 gesetzt wird.


    For $i = 1 To 8 Step 1 ;8 Inputs auslesen

    $Zahl += 0.1 ; Inputarray hochzählen

    $Inputportread[$Zahl] = GUICtrlRead($Inputport[$Zahl]) ; Input auslesen


    IniWrite($filesavedialog & ".ini",$i,"Input",$Inputportread[$Zahl]) ; Ini beschrieben

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

    Next


    Case $MenuItem7
    Exit

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

    EndSwitch
    WEnd

    [/autoit]
  • Simples .ini Write Problem

    • AutoTim
    • 16. August 2010 um 00:15

    Ich bekomme aber nur in der Console ..\..\..\Dateiname ohne Endung ?(
    lg Tim

  • Simples .ini Write Problem

    • AutoTim
    • 16. August 2010 um 00:01

    Was ist hieran Falsch ? Wenn cih Speichern ausfühe, kommt kein Fehler, ich finde aber keine Datei ;)

    [autoit]

    $filesavedialog = FileSaveDialog("Projekt speichern",@DesktopDir,"INI-Datei (*.ini;)",16) ;Speichern Dialog
    ConsoleWrite($filesavedialog)
    IniWrite($filesavedialog&"\.ini","Test","Key","Wert")

    [/autoit]

    lg Tim


    Problem gefunden. Ich muss in den SaveDialog am ende noch .ini schreiben. Kann ich das irgendwie ändern ? Ohne das ich unten noch &"\.ini" hinzufüge ;)

  • 3D Rollenspiel

    • AutoTim
    • 15. August 2010 um 21:44

    Muss es denn 3D sein ? 2D ist doch auch gut ;) Siehe Freewar ! ;) Wenn es auf jeden Fall 3D sein soll, dann bin ich der Meinung, wenn es erst mal läuft, und USER und USER hinzukommen, wird AutoIt zu langsamm werden. Unterschätze nicht die Menge an Spielern, wenn es gut wird ;)

    lg Tim

  • Hilfe bei Tray

    • AutoTim
    • 14. August 2010 um 22:57

    Einfach in einer If - Schleife abfragen, ob das Fenster offen ist, wenn ja, dann eine GUI einblenden. Das ist eigentlich alles. Denn wenn es nciht da ist, wird es automatisch geschlossen. ;)

    lg Tim

  • .ini oder bessere lösung

    • AutoTim
    • 14. August 2010 um 22:56

    Danke, werde mich melden, wenn ich noch Hilfe brauche ;)

    lg Tim

  • Just 4 Fun - Was tut das Skript?

    • AutoTim
    • 14. August 2010 um 22:54

    Wo zum Henker, kommt die MsgBox her ?(

    lg Tim

  • While schleife + Counter

    • AutoTim
    • 14. August 2010 um 13:58
    Zitat von L3viathan

    Du suchst eine For-Schleife:

    [autoit]


    For $i=1 To 3;Zähle von 1 bis 3
    ;Tue irgendwas mit $i, $i steht als Variable zur Verfügung
    Next

    [/autoit]
    [autoit]


    For $i=1 To 3;Zähle von 1 bis 3
    ;Tue irgendwas mit $i, $i steht als Variable zur Verfügung <-- Hier kannst du deinen Tooltip reinschrieben, und nicht Sleep vergessen ;)
    Next

    [/autoit]
  • .ini oder bessere lösung

    • AutoTim
    • 14. August 2010 um 13:56

    Hey, also ich bräuchte mal einen Rat. Und zwar habe ich eine Gui, in der der Anwender eine Menge verschiedener Daten eingeben kann. Es sind keine Sätze, oder rießig lange Zahlen. Es sind ca 40 Inputs da, und in jeder sind nur so 1-6 ziffer lange zahlen. Also keine große Zahl. Das selbe mit den Wörtern. Der Anwender soll inputtechnisch 30 wörter eingeben. Also die (Buttonbeschriftung), und per speichern, diese Zeiten udn Beschriftungen speichern.
    Ich habe bei dem klick auf speichern gedacht, das jeder Input seinen Wert in eine .ini Datei speichert. Und per öffnen, diese Werte wider gesetzt werden. Aber ist das schlau, soetwas per .ini zu machen ? Habe ich da andere einfachere Möglichkeiten, so viele Variablen einfach in eine Datei zu schreiben.

    Wenn es sowas gibt, das für soetwas gedacht ist, lasst Ihr mich es bestimmt erfahren ;)

    lg Tim

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™