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

Beiträge von button421

  • K8055 Programmer?

    • button421
    • 25. August 2010 um 17:34

    Tut mir leid, das ich mich nochmal melde, aber bei Schnitzel Skript kommt ein Fehler:

    >"D:\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\Jonathan Verbeek\Desktop\K8055 Programmer\k8055 Programmer RELEASED.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams
    +>17:31:58 Starting AutoIt3Wrapper v.2.0.1.24 Environment(Language:0407 Keyboard:00000407 OS:WIN_VISTA/Service Pack 2 CPU:X64 OS:X86)
    >Running AU3Check (1.54.19.0) fromD:\AutoIt3
    +>17:31:59 AU3Check ended.rc:0
    >Running:(3.3.6.1)D:\AutoIt3\autoit3.exe "C:\Users\Jonathan Verbeek\Desktop\K8055 Programmer\k8055 Programmer RELEASED.au3"
    C:\Users\Jonathan Verbeek\Desktop\K8055 Programmer\k8055 Programmer RELEASED.au3 (238 :) ==> Subscript used with non-Array variable.:
    For $i = 1 To $inisection[0][0]
    For $i = 1 To $inisection^ ERROR
    ->17:32:03 AutoIT3.exe ended.rc:1
    >Exit code: 1 Time: 5.352

    Was ist falsch, was muss ich ändern?

  • K8055 Programmer?

    • button421
    • 10. August 2010 um 14:13
    Spoiler anzeigen
    [autoit]

    #include<Array.au3>
    #include-once
    #cs ----------------------------------------------------------------------------

    AutoIt Version: 3.3.0.0
    Author: myName

    Script Function:
    handles the k8055d.dll 2009.10.19

    #ce ----------------------------------------------------------------------------
    Func USB_DLLOpen()

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

    DllOpen(@ScriptDir & "\" & "k8055D_multi.dll") ; öffnen der DLL

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

    EndFunc ;==>USB_DLLOpen

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

    ;----------------------------------------------------------------------------

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

    Func initial_board($address)

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

    $begin = TimerInit()
    Do
    $result = USBOpenDevice($address)
    Sleep(250)

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

    $dif = TimerDiff($begin)

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

    If $dif > "4000" Then ExitLoop

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

    Until $result = 1

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

    ClearAllDigital($address)

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

    Sleep(250)

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

    ;~ SetDigitalChannel($address, "4")

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

    If $result = 1 Then
    Return "1"

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

    Else
    MsgBox(0, "ERROR", "fehler bei initialisierung des USB board's" & $address)
    MsgBox(0, "ERROR", "Programm wird beendet! mit " & $result)
    Exit
    Return "0"

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

    EndIf

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

    EndFunc ;==>initial_board

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

    ;----------------------------------------------------------------------------

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

    Func USBOpenDevice($address)

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

    $result = DllCall("k8055D_multi.dll", "long", "OpenDevice", "long", $address)

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

    If $result[0] = $address Then
    Return "1"

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

    Else
    ;MsgBox(16, "ERROR", "Keine Verbindung zu USB BOARD ADRESSE " & $address & " !!", 2)
    ;exit
    Return "0"
    EndIf

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

    EndFunc ;==>USBOpenDevice

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

    ;---------------------------------------------------------------------------

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

    Func CloseAllDevice()
    $res = DllCall("k8055D_multi.dll", "none", "CloseDevice")
    DllClose(@ScriptDir & "\" & "k8055D_multi.dll") ; öffnen der DLL

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

    EndFunc ;==>CloseAllDevice

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

    ;---------------------------------------------------------------------------

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

    Func SearchDevices()

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

    $result = DllCall("k8055D_multi.dll", "long", "SearchDevices")

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

    Return $result[0]

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

    EndFunc ;==>SearchDevices

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

    ;---------------------------------------------------------------------------

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

    Func USBCloseDevice($address)
    SetCurrentDevice($address)
    $res = DllCall("k8055D_multi.dll", "none", "CloseDevice")
    ;Return ;;$result[0]
    EndFunc ;==>USBCloseDevice

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

    ;---------------------------------------------------------------------------

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

    Func ClearAllDigital($address)
    SetCurrentDevice($address)
    $res = DllCall("k8055D_multi.dll", "int", "ClearAllDigital")
    EndFunc ;==>ClearAllDigital

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

    ;----------------------------------------------------------------------------

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

    Func SetCurrentDevice($address)

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

    $begin = TimerInit()
    Do

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

    $result = DllCall("k8055D_multi.dll", "long", "OpenDevice", "int", $address)

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

    ;ToolTip($address&"="&$result[0],0,0)
    $dif = TimerDiff($begin)

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

    If $dif > "4000" Then ExitLoop

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

    Until $address = $result[0]

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

    ;ToolTip("",0,0)

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

    If $address = $result[0] Then
    ;nix
    Else
    MsgBox(0, "", "adresse = " & $address & " result = " & $result[0])

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

    EndIf

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

    EndFunc ;==>SetCurrentDevice

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

    ;----------------------------------------------------------------------------

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

    Func SetDigitalChannel($address, $channel)
    SetCurrentDevice($address)
    DllCall("k8055D_multi.dll", "none", "SetDigitalChannel", "int", $channel)
    EndFunc ;==>SetDigitalChannel

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

    ;---------------------------------------------------------------------------

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

    Func ClearDigitalChannel($address, $channel)
    SetCurrentDevice($address)
    DllCall("k8055D_multi.dll", "none", "ClearDigitalChannel", "int", $channel)
    EndFunc ;==>ClearDigitalChannel

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

    ;---------------------------------------------------------------------------

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

    Func ReadAnalogChannel($address, $channel)
    SetCurrentDevice($address)
    $result = DllCall("k8055D_multi.dll", "int", "ReadAnalogChannel", "int", $channel)
    Return $result[0]
    EndFunc ;==>ReadAnalogChannel

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

    ;---------------------------------------------------------------------------

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

    Func ReadAllDigital($address)
    SetCurrentDevice($address)
    $alldigit = DllCall("k8055D_multi.dll", "int", "ReadAllDigital")
    Return $alldigit[0]
    EndFunc ;==>ReadAllDigital
    ;---------------------------------------------------------------------------

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

    Func ReadDigitalChannel($address, $sellect)
    Dim $channel[6]
    $channel[1] = 0
    $channel[2] = 0
    $channel[3] = 0
    $channel[4] = 0
    $channel[5] = 0

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

    $wert = ReadAllDigital($address)

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

    ;MsgBox(0,"",$alldigit[0] & " " & $wert)
    Select

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

    Case $wert = 0
    $channel[1] = 0
    $channel[2] = 0
    $channel[3] = 0
    $channel[4] = 0
    $channel[5] = 0

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

    Case $wert = 1
    ;I1
    $channel[1] = 1

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

    Case $wert = 2
    ;I2
    $channel[2] = 1

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

    Case $wert = 3
    ;I1 + I2
    $channel[1] = 1
    $channel[2] = 1

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

    Case $wert = 4
    ;I3
    $channel[3] = 1

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

    Case $wert = 5
    ;I3 + I1
    $channel[1] = 1
    $channel[3] = 1

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

    Case $wert = 6
    ;I3 + I2
    $channel[2] = 1
    $channel[3] = 1

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

    Case $wert = 7
    ;I3 + I2 + I1
    $channel[1] = 1
    $channel[2] = 1
    $channel[3] = 1

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

    Case $wert = 8
    ;I4
    $channel[4] = 1

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

    Case $wert = 9
    ;I4 + I1
    $channel[1] = 1
    $channel[4] = 1

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

    Case $wert = 10
    ;I4 + I2
    $channel[2] = 1
    $channel[4] = 1

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

    Case $wert = 11
    ;I4 + I2 + I1
    $channel[1] = 1
    $channel[2] = 1
    $channel[4] = 1

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

    Case $wert = 12
    ;I4 + I3
    $channel[3] = 1
    $channel[4] = 1

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

    Case $wert = 13
    ;I4 + I3 + I1
    $channel[1] = 1
    $channel[3] = 1
    $channel[4] = 1

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

    Case $wert = 14
    ;I4 + I3 + I2
    $channel[2] = 1
    $channel[3] = 1
    $channel[4] = 1

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

    Case $wert = 15
    ;I4 + I3 * I2 + I1
    $channel[1] = 1
    $channel[2] = 1
    $channel[3] = 1
    $channel[4] = 1

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

    Case $wert = 16
    ;I5
    $channel[5] = 1

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

    Case $wert = 17
    ;I1
    $channel[1] = 1
    $channel[5] = 1

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

    Case $wert = 18
    ;I2
    $channel[2] = 1
    $channel[5] = 1

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

    Case $wert = 19
    ;I1 + I2
    $channel[1] = 1
    $channel[2] = 1
    $channel[5] = 1

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

    Case $wert = 20
    ;I3
    $channel[3] = 1
    $channel[5] = 1

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

    Case $wert = 21
    ;I3 + I1
    $channel[1] = 1
    $channel[3] = 1
    $channel[5] = 1

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

    Case $wert = 22
    ;I3 + I2
    $channel[2] = 1
    $channel[3] = 1
    $channel[5] = 1

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

    Case $wert = 23
    ;I3 + I2 + I1
    $channel[1] = 1
    $channel[2] = 1
    $channel[3] = 1
    $channel[5] = 1

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

    Case $wert = 24
    ;I4
    $channel[4] = 1
    $channel[5] = 1

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

    Case $wert = 25
    ;I4 + I1
    $channel[1] = 1
    $channel[4] = 1
    $channel[5] = 1

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

    Case $wert = 26
    ;I4 + I2
    $channel[2] = 1
    $channel[4] = 1
    $channel[5] = 1

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

    Case $wert = 27
    ;I4 + I2 + I1
    $channel[1] = 1
    $channel[2] = 1
    $channel[4] = 1
    $channel[5] = 1

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

    Case $wert = 28
    ;I4 + I3
    $channel[3] = 1
    $channel[4] = 1
    $channel[5] = 1

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

    Case $wert = 29
    ;I4 + I3 + I1
    $channel[1] = 1
    $channel[3] = 1
    $channel[4] = 1
    $channel[5] = 1

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

    Case $wert = 30
    ;I4 + I3 + I2
    $channel[2] = 1
    $channel[3] = 1
    $channel[4] = 1
    $channel[5] = 1

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

    Case $wert = 31
    ;I4 + I3 * I2 + I1
    $channel[1] = 1
    $channel[2] = 1
    $channel[3] = 1
    $channel[4] = 1
    $channel[5] = 1

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

    Case Else

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

    $channel[1] = 0
    $channel[2] = 0
    $channel[3] = 0
    $channel[4] = 0
    $channel[5] = 0

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

    EndSelect

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

    If $channel[$sellect] = 1 Then
    ; MsgBox(0,"","return 1")
    Return 1
    Else
    ; MsgBox(0,"","return 0")
    Return 0

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

    EndIf

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

    EndFunc ;==>ReadDigitalChannel
    ;----------------------------------------------------------------------------

    [/autoit]

    aber wozu brauchst du das? Ich will doch nur wissen, wie eine Combobox die ausgewählten Checkboxen (also mit IniRead, denn er schreibt das ja in die ini) anzeigt.

  • K8055 Programmer?

    • button421
    • 9. August 2010 um 17:54

    Hi Leute!
    Bin mal wieder da.
    Ich hab ein neues Projekt angefangen, und zwar ein K8055 Programmer. Damit kann mann kleine Programme fürs K8055 Board programmieren. Allerdings hätte ich da ein kleines Problem:

    Wenn man Digitalen "Ausgang Ein/Ausschalten" bei "Aktion hinzufügen" auswählt, kommt zwar unten das was kommen soll (achtet nicht auf die falschen Koordinaten, ändere ich später), aber wenn ihr dann in der 2.Combobox guckt, steht da nur 1. Da soll aber die ausgewählten Checkboxen stehen, die werden ja in die .ini geschrieben. Also wisst ihr, wie da nur die ausgewählten Checkboxen stehen können? Muss ja irgendwas mit IniWrite sein.
    Also

    Mein Skript
    [autoit]


    #region includes ;########################
    #include <k8055udf.au3>
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ProgressConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <GuiStatusBar.au3>
    #include <ListViewConstants.au3>
    #include <ComboConstants.au3>
    #endregion includes
    ;##########################################
    Global $adressebin=""
    Global $aktion="Programm erfolgreich gestartet"
    Global $ini=@ScriptDir&"\logdatei.ini"
    ;~ Global $inputsoutputsini = IniRead($ini,"inputsandoutputs",Default,"1")
    IniDelete($ini,"log")
    IniWrite($ini,"log","Startdaten",@HOUR&":"&@MIN&":"&@SEC&":"&@MSEC&"-Datum:"&@MDAY&"."&@MON&"."&@YEAR)
    #Region ### START Verbindungsform ### Form=
    $verbindungsform = GUICreate("Verbindung", 184, 100, 190, 126, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
    $SK5 = GUICtrlCreateCheckbox("SK5", 24, 16, 41, 17)
    $SK6 = GUICtrlCreateCheckbox("SK6", 128, 16, 41, 17)
    $Adresse = GUICtrlCreateGroup("Adresse", 8, 0, 169, 41)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUICtrlCreateLabel("<---------------->", 64, 16, 64, 17)
    $Progress1 = GUICtrlCreateProgress(0, 80, 182, 17)
    $mitboardverbinden = GUICtrlCreateButton("Mit K8055 Board verbinden", 8, 48, 171, 25, $WS_GROUP)
    GUISetState(@SW_HIDE)
    #EndRegion ### END Verbindungsform ###
    ;##########################################
    #Region ### START Hauptform ### Form=c:\users\jonathan verbeek\desktop\k8055 programmer\hauptform.kxf
    $Form1_1 = GUICreate("K8055 Board Programmer Basicpack - created by button421", 519, 412, 187, 121)
    $statusleiste = _GUICtrlStatusBar_Create($Form1_1)
    Dim $statusleiste_PartsWidth[2] = [439, -1]
    _GUICtrlStatusBar_SetParts($statusleiste, $statusleiste_PartsWidth)
    _GUICtrlStatusBar_SetText($statusleiste, $aktion, 0)
    _GUICtrlStatusBar_SetText($statusleiste, "Verbunden", 1)
    $DigitaleEingaenge = GUICtrlCreateGroup("Digitale Eingänge", 8, 0, 169, 41)
    $I1 = GUICtrlCreateCheckbox("I1", 16, 16, 25, 17)
    $I2 = GUICtrlCreateCheckbox("I2", 48, 16, 25, 17)
    $I3 = GUICtrlCreateCheckbox("I3", 80, 16, 25, 17)
    $I4 = GUICtrlCreateCheckbox("I4", 112, 16, 25, 17)
    $I5 = GUICtrlCreateCheckbox("I5", 144, 16, 25, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $DigitaleAusgaenge = GUICtrlCreateGroup("Digitale Ausgänge", 184, 0, 329, 41)
    $O1 = GUICtrlCreateCheckbox("O1", 192, 16, 33, 17)
    $O2 = GUICtrlCreateCheckbox("O2", 232, 16, 33, 17)
    $O3 = GUICtrlCreateCheckbox("O3", 272, 16, 33, 17)
    $O4 = GUICtrlCreateCheckbox("O4", 312, 16, 33, 17)
    $O5 = GUICtrlCreateCheckbox("O5", 352, 16, 33, 17)
    $O6 = GUICtrlCreateCheckbox("O6", 392, 16, 33, 17)
    $O7 = GUICtrlCreateCheckbox("O7", 432, 16, 33, 17)
    $O8 = GUICtrlCreateCheckbox("O8", 472, 16, 33, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $ListView1 = GUICtrlCreateListView("Aktionen", 8, 48, 506, 310)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 502)
    $addaktion = GUICtrlCreateButton("Aktion hinzufügen", 8, 360, 107, 25, $WS_GROUP)
    $delaktion = GUICtrlCreateButton("Aktion löschen", 120, 360, 91, 25, $WS_GROUP)
    $anleitung = GUICtrlCreateButton("Anleitung für Experimente", 216, 360, 131, 25, $WS_GROUP)
    $hilfe = GUICtrlCreateButton("Hilfe und Info", 352, 360, 75, 25, $WS_GROUP)
    $beenden = GUICtrlCreateButton("Beenden", 432, 360, 75, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Hauptform ###
    ;#######################################
    #Region ### START Aktion hinzufügen ### Form=
    $actionadd = GUICreate("Aktion hinzufügen", 246, 187, 192, 124, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
    $Aktionlabel = GUICtrlCreateLabel("Aktion:", 8, 8, 37, 17)
    $aktioncombo = GUICtrlCreateCombo("", 48, 8, 193, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Meldung anzeigen|Digitalen Ausgang ein/ausschalten|Abfrage ob Digitaler Eingang ein/aus|Wert für 7-Segment Display festlegen")
    $probs = GUICtrlCreateGroup("Einstellungen für Aktion festlegen", 8, 32, 233, 121)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $cancelactionadd = GUICtrlCreateButton("Abbrechen", 168, 160, 75, 25, $WS_GROUP)
    $okactionadd = GUICtrlCreateButton("OK", 88, 160, 75, 25, $WS_GROUP)
    GUISetState(@SW_HIDE)
    #EndRegion ### END Aktion hinzufügen ###
    ;#######################################
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case -3, $beenden
    Exit
    Case $SK5
    If BitAND(GUICtrlRead($SK5),$GUI_CHECKED) Then
    $adressebin = "SK5/"
    EndIf
    Case $SK6
    If BitAND(GUICtrlRead($SK6),$GUI_CHECKED) Then
    $adressebin = "SK6/"
    EndIf
    Case $mitboardverbinden
    If GUICtrlRead($adressebin) = "SK5/SK6/" Then
    USB_DLLOpen()
    initial_board(0)
    GUICtrlSetState($Progress1, 100)
    MsgBox(64,"Info","Mit Board verbunden!")
    GUISetState(@SW_SHOW, $Form1_1)
    GUISetState(@SW_HIDE, $verbindungsform)
    ElseIf GUICtrlRead($adressebin) = "SK6/" Then
    USB_DLLOpen()
    initial_board(1)
    GUICtrlSetState($Progress1, 100)
    MsgBox(64,"Info","Mit Board verbunden!")
    GUISetState(@SW_SHOW, $Form1_1)
    GUISetState(@SW_HIDE, $verbindungsform)
    ElseIf GUICtrlRead($adressebin) = "SK5/" Then
    USB_DLLOpen()
    initial_board(2)
    GUICtrlSetState($Progress1, 100)
    MsgBox(64,"Info","Mit Board verbunden!")
    GUISetState(@SW_SHOW, $Form1_1)
    GUISetState(@SW_HIDE, $verbindungsform)
    Else
    USB_DLLOpen()
    initial_board(3)
    GUICtrlSetState($Progress1, 100)
    MsgBox(64,"Info","Mit Board verbunden!")
    GUISetState(@SW_SHOW, $Form1_1)
    GUISetState(@SW_HIDE, $verbindungsform)
    EndIf
    Case $I1
    If BitAND(GUICtrlRead($I1),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs")
    IniWrite($ini,"inputsandoutputs","I1","1")
    Else
    IniDelete($ini,"inputsandoutputs")
    IniWrite($ini,"inputsandoutputs","I1","0")
    EndIf
    Case $I2
    If BitAND(GUICtrlRead($I2),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","I2")
    IniWrite($ini,"inputsandoutputs","I2","1")
    Else
    IniDelete($ini,"inputsandoutputs","I2")
    IniWrite($ini,"inputsandoutputs","I2","0")
    EndIf
    Case $I3
    If BitAND(GUICtrlRead($I3),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","I3")
    IniWrite($ini,"inputsandoutputs","I3","1")
    Else
    IniDelete($ini,"inputsandoutputs","I3")
    IniWrite($ini,"inputsandoutputs","I3","0")
    EndIf
    Case $I4
    If BitAND(GUICtrlRead($I4),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","I4")
    IniWrite($ini,"inputsandoutputs","I4","1")
    Else
    IniDelete($ini,"inputsandoutputs","I4")
    IniWrite($ini,"inputsandoutputs","I4","0")
    EndIf
    Case $I5
    If BitAND(GUICtrlRead($I5),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","I5")
    IniWrite($ini,"inputsandoutputs","I5","1")
    Else
    IniDelete($ini,"inputsandoutputs","I5")
    IniWrite($ini,"inputsandoutputs","I5","0")
    EndIf
    Case $O1
    If BitAND(GUICtrlRead($O1),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","O1")
    IniWrite($ini,"inputsandoutputs","O1","1")
    Else
    IniDelete($ini,"inputsandoutputs","O2")
    IniWrite($ini,"inputsandoutputs","O1","0")
    EndIf
    Case $O2
    If BitAND(GUICtrlRead($O2),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","O2")
    IniWrite($ini,"inputsandoutputs","O2","1")
    Else
    IniDelete($ini,"inputsandoutputs","O2")
    IniWrite($ini,"inputsandoutputs","O2","0")
    EndIf
    Case $O3
    If BitAND(GUICtrlRead($O3),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","O3")
    IniWrite($ini,"inputsandoutputs","O3","1")
    Else
    IniDelete($ini,"inputsandoutputs","O3")
    IniWrite($ini,"inputsandoutputs","O3","0")
    EndIf
    Case $O4
    If BitAND(GUICtrlRead($O4),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","O4")
    IniWrite($ini,"inputsandoutputs","O4","1")
    Else
    IniDelete($ini,"inputsandoutputs","O4")
    IniWrite($ini,"inputsandoutputs","O4","0")
    EndIf
    Case $O5
    If BitAND(GUICtrlRead($O5),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","O5")
    IniWrite($ini,"inputsandoutputs","O5","1")
    Else
    IniDelete($ini,"inputsandoutputs","O5")
    IniWrite($ini,"inputsandoutputs","O5","0")
    EndIf
    Case $O6
    If BitAND(GUICtrlRead($O6),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","O6")
    IniWrite($ini,"inputsandoutputs","O6","1")
    Else
    IniDelete($ini,"inputsandoutputs","O6")
    IniWrite($ini,"inputsandoutputs","O6","0")
    EndIf
    Case $O7
    If BitAND(GUICtrlRead($O7),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","O7")
    IniWrite($ini,"inputsandoutputs","O7","1")
    Else
    IniDelete($ini,"inputsandoutputs","O7")
    IniWrite($ini,"inputsandoutputs","O7","0")
    EndIf
    Case $O8
    If BitAND(GUICtrlRead($O8),$GUI_CHECKED)Then
    IniDelete($ini,"inputsandoutputs","O8")
    IniWrite($ini,"inputsandoutputs","O8","1")
    Else
    IniDelete($ini,"inputsandoutputs","O8")
    IniWrite($ini,"inputsandoutputs","O8","0")
    EndIf
    Case $addaktion
    GUISetState(@SW_SHOW, $actionadd)
    GUICtrlDelete($probs)
    Case $aktioncombo
    If GUICtrlRead($aktioncombo) = "Meldung anzeigen" Then
    $probs = GUICtrlCreateGroup("Einstellungen für Meldung festlegen", 8, 32, 233, 121)
    $title = GUICtrlCreateInput("Titel der Meldung",17,45,217,21)
    $text = GUICtrlCreateInput("Text der Meldung",17,70,217,73)
    IniWrite($ini,"aktion","Msg","1")
    EndIf
    If GUICtrlRead($aktioncombo) = "Digitalen Ausgang Ein/Ausschalten" Then
    $probs = GUICtrlCreateGroup("Einstellungen für Ausgang festlegen", 8, 32, 233, 121)
    $outputlabel = GUICtrlCreateLabel("Ausgang:",8,24,49,17)
    $outputcombo = GUICtrlCreateCombo("",64,24,153,17, $CBS_DROPDOWNLIST)
    ;~ GUICtrlSetData(-1,$inputsoutputsini)
    $valueoutput = GUICtrlCreateLabel("Wert:",8,56,30,17)
    $onoutput = GUICtrlCreateRadio("Einschalten",32,72,81,17,$BS_AUTORADIOBUTTON)
    EndIf
    EndSwitch
    WEnd

    [/autoit]


    Ich hab die initeile auskommentiert.

    Mfg button421 ;)

  • K8055 Board - Abfrage ob Taster gedrückt?

    • button421
    • 25. Juli 2010 um 18:41

    @SlowlyDead: Das Board wird per usb angeschlossen!

  • K8055 Board - Abfrage ob Taster gedrückt?

    • button421
    • 25. Juli 2010 um 17:20

    Hi Leute!
    Ich weiß ich hab schon ein Thread wo ich das als Antwort geschrieben hab, aber nochmal:
    Kann ich eine Abfrage in Autoit machen, die ein Skriptteil ausführt, wenn ich die Taster Inp1 bis Inp5 auf der Platine drücke? Also so oder änlich?:

    [autoit]


    If ReadDigitalChannel("Inp1") = 1 Then
    ;Skriptteil
    EndIf

    [/autoit]


    So funzt das aufjedenfall nicht.
    Und noch ein Problem:
    Die UDF von vivus funzt auch nicht, folgende Meldung kommt:

    Spoiler anzeigen


    D:\AutoIt3\Include\k8055udf.au3 (59) : ==> Subscript used with non-Array variable.:
    If $result[0] = $address Then
    If $result^ ERROR
    ->17:00:40 AutoIT3.exe ended.rc:1


    Was stimmt mit der UDF nicht und wie kann ich diese Abfrage programmieren?

    Mfg button421

  • AutoIT mit USB EXPERIMENT INTERFACE BOARD - BAUSATZ

    • button421
    • 25. Juli 2010 um 17:04

    Ich habe mir das K8055-Board aber schon gekauft :(

  • AutoIT mit USB EXPERIMENT INTERFACE BOARD - BAUSATZ

    • button421
    • 24. Juli 2010 um 19:58

    Ähm, DjBlumes Link funktioniert nicht mehr, kann mir jemand ein kurzes Beispiel schreiben, wo die grundlagen drin stehen?
    P.S.: Wie kann ich eine Abfrage machen ob ein Taster (Inp1-Inp5) gedrückt wurde? Etwa:

    [autoit]


    If _ReadDigitalInput(Inp1) Then
    ;...
    EndIf

    [/autoit]

    Dank

  • AutoIT mit USB EXPERIMENT INTERFACE BOARD - BAUSATZ

    • button421
    • 14. Juli 2010 um 13:33

    Danke! IN der Anleitung steht auch was von Visual Basic (da habe ich Anfängerkenntnisse).

  • AutoIT mit USB EXPERIMENT INTERFACE BOARD - BAUSATZ

    • button421
    • 13. Juli 2010 um 19:37

    Hallo Leute!
    Ich habe Interesse an diesem Bausatz, in der Programmieranleitung steht:

    Spoiler anzeigen


    Mithilfe dieser Arbeitsweisen und Funktionen, die durch die DLL exportiert werden, können sie maßgeschneiderte Windows-Applikationen (98SE, 2000, ME, XP) in Delphi, Visual Basic, C++ Builder oder jedem anderen 32Bit-Windows-Hilfsprogramm für Applikationen, das DLL unterstützt, schreiben.


    Ist AutoIT 32Bit und unterstütz AutoIT DLLs?

    MfG button421

  • Keyboard - Schleife?

    • button421
    • 3. Juli 2010 um 11:58

    Danke! Das ging ja fix ^^

  • Keyboard - Schleife?

    • button421
    • 3. Juli 2010 um 11:32

    Hallo Community,
    Ich habe nochmal angefangen das SUPERKEYBOARD zu überarbeiten.

    CHECKLISTE


    -Neue GUI
    -Sounds aufnehmen
    -Tasten neu designen
    -Soundplay einbinden


    Ich habe beim 2.C die schwarze Taste mit Photoshop rausgeschnitten.
    Das Problem:
    Ich brauch ja irngendeine If-Schleife, die wenn man auf $C3 klickt, abfragt was in der ListView ausgewählt wurde.
    Meine Versuche:

    [autoit]


    ;Versuch 1:
    If GUICtrlRead($ListView1) = "12Saitengitarre"Then
    SoundPlay(@ScriptDir&"\sounds\12saitengitarre\c3.mp3")
    EndIf ;Geht nicht
    ;Versuch 2:
    If GUICtrlRead($12saitengitarre)Then
    SoundPlay(@ScriptDir&"\sounds\12saitengitarre\c3.mp3")
    EndIf ;Geht auch nicht
    Switch $ListView1
    Case $12saitengitarre
    SoundPlay(@ScriptDir&"\sounds\12saitengitarre\c3.mp3")
    EndSwitch ;Geht auch nicht

    [/autoit]


    Überall spielt er nicht, aber wenn ich ein zweiten Sound (mit Versuch 2) darunter setze, spielt er immer den letzten der Schleife statt das was ausgewählt ist; ich hoffe das versteht ihr :whistling:

    Mein Skript
    [autoit]


    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    $halbton = @ScriptDir&"\bilder\#.bmp"
    For $i = 1 To 100
    Send("{VOLUME_UP}")
    Next
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("SUPERKEYBOARD - Sounds by Yahama DGX-620 - created by button421", 501, 261, 210, 148, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
    $cis3 = GUICtrlCreatePic($halbton, 32, 4, 26, 154, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $dis3 = GUICtrlCreatePic($halbton, 74, 4, 26, 154, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $fis3 = GUICtrlCreatePic($halbton, 158, 4, 26, 154, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $gis3 = GUICtrlCreatePic($halbton, 200, 4, 26, 154, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $ais3 = GUICtrlCreatePic($halbton, 242, 4, 26, 154, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $c3 = GUICtrlCreatePic(@ScriptDir&"\bilder\c3.bmp", 4, 4, 42, 252, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $d3 = GUICtrlCreatePic(@ScriptDir&"\bilder\d3.bmp", 46, 4, 42, 252, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $e3 = GUICtrlCreatePic(@ScriptDir&"\bilder\e3.bmp", 88, 4, 42, 252, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $f3 = GUICtrlCreatePic(@ScriptDir&"\bilder\f3.bmp", 130, 4, 42, 252, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $g3 = GUICtrlCreatePic(@ScriptDir&"\bilder\g3.bmp", 172, 4, 42, 252, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $a3 = GUICtrlCreatePic(@ScriptDir&"\bilder\a3.bmp", 214, 4, 42, 252, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $h3 = GUICtrlCreatePic(@ScriptDir&"\bilder\h3.bmp", 256, 4, 42, 252, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $c4 = GUICtrlCreatePic(@ScriptDir&"\bilder\c4.bmp", 296, 4, 41, 252, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $ListView1 = GUICtrlCreateListView("Sounds", 344, 0, 153, 225)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 132)
    #EndRegion ### Koda GUI section ###
    #Region ### Sounds ###
    $12Saitengitarre = GUICtrlCreateListViewItem("12Saitengitarre", $ListView1)
    $Akkordion = GUICtrlCreateListViewItem("Akkordion", $ListView1)
    $Bass = GUICtrlCreateListViewItem("Bass", $ListView1)
    $Brass = GUICtrlCreateListViewItem("Brass", $ListView1)
    $Chor = GUICtrlCreateListViewItem("Chor", $ListView1)
    $EPianoFunky = GUICtrlCreateListViewItem("E-Piano Funky", $ListView1)
    $EPianoSuitcase = GUICtrlCreateListViewItem("E-Piano Suitcase", $ListView1)
    $Klassikgitarre = GUICtrlCreateListViewItem("Klassikgitarre", $ListView1)
    $Klavier = GUICtrlCreateListViewItem("Klavier", $ListView1)
    $Kirchenorgel = GUICtrlCreateListViewItem("Kirchenorgel", $ListView1)
    $Piccolofloete = GUICtrlCreateListViewItem("Piccoloflöte", $ListView1)
    $Streicher = GUICtrlCreateListViewItem("Streicher", $ListView1)
    $Synthesheizer = GUICtrlCreateListViewItem("Synthesheizer", $ListView1)
    $Button1 = GUICtrlCreateButton("Info/Hilfe", 344, 232, 75, 25, $WS_GROUP)
    $Button2 = GUICtrlCreateButton("Beenden", 424, 232, 75, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### Sounds ###
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $c3
    _c3()
    Case $cis3
    _cis3()
    Case $d3
    _d3()
    Case $dis3
    _dis3()
    Case $e3
    _e3()
    Case $f3
    _f3()
    Case $fis3
    _fis3()
    Case $g3
    _g3()
    Case $gis3
    _gis3()
    Case $a3
    _a3()
    Case $ais3
    _ais3()
    Case $h3
    _h3()
    Case $c4
    _c4()
    EndSwitch
    WEnd

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

    Func _c3()
    ;Schleife oder änl. Anfang
    SoundPlay(@ScriptDir&"\sounds\12saitengitarre\c3.mp3")
    ;Schleife oder anl. Ende
    EndFunc

    [/autoit]


    Ihr müsst dann natürlich auf Continune anyway klicken ;)

    Mfg button421

  • VirtualCash

    • button421
    • 3. Juli 2010 um 11:20

    @EM: Danke. Hatte ich hier noch nie gehört :rolleyes:

  • VirtualCash

    • button421
    • 28. Juni 2010 um 13:52

    Danke! Ich werde in der UPDATED Version noch mal die Punkte von Ineluki nehmen.
    @noir: Ich bin 10/einhalb.

  • VirtualCash

    • button421
    • 26. Juni 2010 um 18:35

    @Sprenger: Wenn du schließen willst, kommt <<Beenden?>>. Ich kenne so einen Bug nicht.

  • VirtualCash

    • button421
    • 26. Juni 2010 um 18:24

    Naja, soviel muss das jetzt ja auch nicht sein, wie findest du es denn gesamt?

  • VirtualCash

    • button421
    • 26. Juni 2010 um 18:14

    Hi Leute!
    Schaut mal, mein erstes laufendes Skript:
    VirtualCash - Ein kleines Kassenprogramm.
    Man kann damit kaufen, er rechnet aus was du zurückkriegst usw...
    Steckt ganzschön viel Mathe dahinter :S
    Egal. Freue mich auf Kommentare!

    MfG button421

    Dateien

    VirtualCashv10.RAR 333,32 kB – 555 Downloads
  • Kassenprogramm - AutoIT kann nicht mit Kommazahlen rechnen :(

    • button421
    • 26. Juni 2010 um 16:22

    peethebee : Das geht, aber wenn ich dann 10x und dann nochmal 10x Karotten eingebe, dann steht der Wert des letzen Item da.

  • Kassenprogramm - AutoIT kann nicht mit Kommazahlen rechnen :(

    • button421
    • 26. Juni 2010 um 16:07

    Aber dann steht immernoch 1,5 inner Message!

  • Kassenprogramm - AutoIT kann nicht mit Kommazahlen rechnen :(

    • button421
    • 26. Juni 2010 um 16:03

    MsgBox(0,"",Round($karottegesamt, 2)) oder was?

  • Kassenprogramm - AutoIT kann nicht mit Kommazahlen rechnen :(

    • button421
    • 26. Juni 2010 um 15:59

    wie kann ich machen, dass der 1,50 sagt?

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™