Bild bereich festlegen für Maus

  • hallo, habe mal wieder eine super frage :)

    wenn ich einen bestimmten bereich in einem bild anklicken will, bzw. prüfen ob auf einen bestimmten bereich geklickt worden ist, wie geht so etwas?

    habe mal eine beispiel erstellt.
    das passende bild hänge ich mit an.
    es soll auf dem opel emplem geklickt werden

    [autoit]

    $destination = @ScriptDir & "\tigra_back_chop01.jpg"

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

    SplashImageOn("Splash Screen", $destination,572,411, @DesktopWidth / 2 - 266, @DesktopHeight / 2 - 205, 1)
    Sleep(5000)
    SplashOff()

    [/autoit]

    Doktore

    • Offizieller Beitrag

    Hi,

    hier mal eine Idee:

    [autoit]

    $destination = @ScriptDir & "\tigra_back_chop01.jpg"

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

    #include <GUIConstants.au3>

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

    GUICreate("My GUI", 50, 50, 506, 265, $WS_POPUP)
    WinSetTrans("My GUI", "", 1)
    $opel = GUICtrlCreateButton("OPEL", 0, 0, 50, 50)
    GUISetState(@SW_SHOW) ; will display an empty dialog box

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

    SplashImageOn("Splash Screen", $destination, 572, 411, @DesktopWidth / 2 - 266, @DesktopHeight / 2 - 205, 1)
    WinSetOnTop("My GUI", "", 1)
    ; Run the GUI until the dialog is closed
    While 1
    $msg = GUIGetMsg()
    If $msg = $opel Then
    WinSetOnTop("My GUI", "", 0)
    SplashOff()
    MsgBox(0, "", "Enter the club, man")
    Exit(0)
    EndIf
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

    [/autoit]

    P.S.: 1024 *768 ggf. muss die Button-position angepaßt werden.

    So long,

    Mega

    • Offizieller Beitrag

    Hi,

    Spoiler anzeigen
    [autoit]

    $destination = @ScriptDir & "\tigra_back_chop01.jpg"
    #NoTrayIcon
    #include <GUIConstants.au3>

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

    GUICreate("My GUI", 50, 50, 506, 265, $WS_POPUP, $WS_EX_TOOLWINDOW)
    WinSetTrans("My GUI", "", 1)
    $opel = GUICtrlCreateButton("OPEL", 0, 0, 50, 50)
    GUISetState() ; will display an empty dialog box
    SplashImageOn("Splash Screen", $destination, 572, 411, @DesktopWidth / 2 - 266, @DesktopHeight / 2 - 205, 1)
    WinSetOnTop("My GUI", "", 1)

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

    While 1
    $msg = GUIGetMsg()
    If $msg = $opel Then
    WinSetOnTop("My GUI", "", 0)
    SplashOff()
    MsgBox(0, "", "Enter the club, man")
    Exit (0)
    EndIf
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

    [/autoit]

    So long,

    Mega