MouseMove+ Bild geht das?

  • Hallo,
    ich habe eine Frage bzw ein Problem
    also ich will ein bild klickbar machen
    d.h
    wenn ich auf dieses bild drauf drücke, soll sich die maus bewegen.
    ist das möglich?
    Also die Codes bzw die zahlen fürs Mouse Move habe ich ja schon


    Ich will dieses bild hier klick bar machen
    [Blockierte Grafik: http://img37.imageshack.us/img37/875/l0g0ut1.jpg]


    Geht das? ist das möglich?

    [Vorstellung: aufs logout drücken, und schon sollte sich die maus bewegen ]

  • So z.B.

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GUICtrlSetOnHover_UDF.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 447, 192, 124)
    $pic=GUICtrlCreatePic ( "l0g0ut1.jpg", 20, 20, 73, 27 )
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    _GUICtrl_SetOnHover($pic , Default , Default , "_PrimaryDownFunc" )

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

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

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

    EndSwitch
    WEnd

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

    Func _PrimaryDownFunc()
    MouseMove ( 100, 100 )
    EndFunc

    [/autoit]

    Die include gibts hier:

    http://www.autoitscript.com/forum/index.php?showtopic=55120&hl=_GUICtrl_SetOnHover

  • Thx für die Antwort

    --------------------------

    aber bei mir kommt error :/

    ==> Error opening the file.:

  • Ups, so gehts ja auch:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    ;~ #include <GUICtrlSetOnHover_UDF.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 447, 192, 124)
    $pic=GUICtrlCreatePic ( "l0g0ut1.jpg", 20, 20, 73, 27 )
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    ;~ _GUICtrl_SetOnHover($pic , Default , Default , "_PrimaryDownFunc" )

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

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

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

    EndSwitch
    WEnd

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

    Func _PrimaryDownFunc()
    MouseMove ( 100, 100 )
    EndFunc

    [/autoit]
  • Dankeschön
    dawäre noch ein problemchen dises logout bild wird nicht angezeigt :/

  • Hm komisch, wo liegt das den?

    Wenn das Script im selben Ordner mit dem Bild liegt, müsste das eigentlich gehen:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 447, 192, 124)
    $pic=GUICtrlCreatePic ( @ScriptDir &"\l0g0ut1.jpg", 20, 20, 73, 27 )
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $pic
    _PrimaryDownFunc()
    EndSwitch
    WEnd

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

    Func _PrimaryDownFunc()
    MouseMove ( 100, 100 )
    EndFunc

    [/autoit]