MSG Box mit klickbarem Link

  • Hier mal ein Beispiel:

    [autoit]

    #include <GUIConstantsEx.au3>

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

    Guicreate ("MsgBox Link", 200, 100)
    $Label=GUICtrlCreateLabel ("Link: ", 5, 5)
    $Link=GUICtrlCreateLabel ("www.autoit.de", 5, 30, 100)
    GUICtrlSetColor (-1, 0x0000ff)
    Guictrlsetfont (-1, 12)
    Guisetstate()
    While 1
    $msg=GUIGetMsg ()
    $mouse = GUIGetCursorInfo()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    Exit
    Case IsArray ($mouse) and $mouse[2] and $mouse[4] = $Link
    ShellExecute ( "www.autoit.de")
    EndSelect
    WEnd

    [/autoit]
  • BadBunny: du arbeitest wohl nach dem Motto "Warum einfach, wenn es auch kompliziert geht?"...

    Spoiler anzeigen
    [autoit]

    GUICreate ("MsgBox Link", 200, 100)
    GUICtrlCreateLabel ("Link: ", 5, 5)
    $Link=GUICtrlCreateLabel ("www.autoit.de", 5, 30, 100)
    GUICtrlSetColor (-1, 0x0000ff)
    GUISetState()
    While true
    Switch GUIGetMsg()
    Case -3
    Exit
    Case $Link
    ShellExecute ( "autoit.de")
    EndSwitch
    WEnd

    [/autoit]
  • Es geht doch auch so wie ich es gesagt hab :D Aber das GuiGetMsg auch die ID abfängt wusste ich nicht... Jeden Tag was neues zu lernen :thumbup:
    Danke :D