Weiterer Fehler GUI und Variable

  • [autoit]

    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 625, 443, 192, 124)
    $beispiel = GUICtrlCreateInput("beispiel.mp3", 64, 168, 121, 21)
    $Button1 = GUICtrlCreateButton("Start", 264, 304, 75, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $msg=GuiGetMsg()
    If $msg=-3 Then Exit
    If $msg=$button1 Then button1()

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

    Wend

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

    Func button1()
    Opt("MouseCoordMode", 2)
    Opt("PixelCoordMode", 2)

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

    While 1

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

    $coord = PixelSearch(742, 192,748, 197,0xFFFBFF )
    If Not @error Then
    MouseClick ("left",746, 196)
    SoundPlay(GUICtrlSetData ($beispiel),1);
    EndIf
    WEnd

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

    EndFunc

    [/autoit]

    leider ist wohl in der zeile hier : SoundPlay(GUICtrlSetData ($beispiel),1);
    etwas falsch habe das auch schon in " getestet etc ich komm leider nicht weiter.

    Gruß

  • OKay habe es nun so gemacht:

    [autoit]

    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 625, 443, 192, 124)
    $beispiel = GUICtrlCreateInput("beispiel1.mp3", 64, 168, 121, 21)
    $Button1 = GUICtrlCreateButton("Start", 264, 304, 75, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $msg=GuiGetMsg()
    If $msg=-3 Then Exit
    If $msg=$button1 Then button1()

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

    Wend

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

    Func button1()
    Opt("MouseCoordMode", 2)
    Opt("PixelCoordMode", 2)

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

    While 1

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

    $coord = PixelSearch(742, 192,748, 197,0xFFFBFF )
    If Not @error Then
    MouseClick ("left",746, 196)
    SoundPlay(GUICtrlRead($beispiel),1);
    EndIf
    WEnd

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

    EndFunc

    [/autoit]

    Bekomme aber nun nach dem Klick eine fehlermeldung und zwar diese: Error_ Incorrect number of parameters ind funciton call.