Problem mit Mousemove

  • Hey Leute ich habe ein Problem mit Mousemove. Habe folgenden Script geschrieben.

    [autoit]

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

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

    $Bookmark = GUICreate("Bookmark it !", 295, 545, 644, 303)
    $newbmx = GUICtrlCreateInput("", 192, 55, 41, 21)
    $newbmy = GUICtrlCreateInput("", 235, 55, 41, 21)
    $laden = GUICtrlCreateButton("Start", 64, 368, 163, 25, $WS_GROUP)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")

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

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

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

    EndSwitch
    If $nMsg = $laden then MouseClick("left", $newbmx,$newbmy,1)

    WEnd

    [/autoit]

    (Er soll nur mein Problem beschreiben)

    Aus irgendwelchen Gründen klickt es einfach nach oben in die linke obere Ecke egal was ich eingebe

    :(

    Hat wer ne Ahnung ?

    Danke

    clonker

    • Offizieller Beitrag
    Spoiler anzeigen
    [autoit]

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

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

    $Bookmark = GUICreate("Bookmark it !", 295, 545, 644, 303)
    $newbmx = GUICtrlCreateInput("", 192, 55, 41, 21)
    $newbmy = GUICtrlCreateInput("", 235, 55, 41, 21)
    $laden = GUICtrlCreateButton("Start", 64, 368, 163, 25, $WS_GROUP)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")

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

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

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

    EndSwitch
    If $nMsg = $laden then MouseClick("left", GUICtrlRead($newbmx),GUICtrlRead($newbmy),1)

    WEnd

    [/autoit]

    Du mußt das Control mit GUICtrlRead auslesen, andernfalls wird auf die ControlId geklickt.

  • Ich bin doof :thumbup:

    Sorry für diese dummen Fragen mache das noch nicht sehr lang ;)

    lg

    clonker