Text Link funktioniert nicht richtig

  • Ich kriege das irgendwie nicht hin wenn ich mit der Maus über dem Text geh das er dann unterstrichen dargestellt wird
    Bin noch Anfänger und weiß nicht was ich da falsch gemacht habe, bin für jede hilfe dankbar

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 623, 442, 192, 124)
    GUISetState(@SW_SHOW)

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

    $link = GUICtrlCreateLabel("link here", 50, 30, 100)
    GuiCtrlSetColor(-1,0x0000FF)
    GUICtrlSetFont(-1, 11, 700,2, "Arial")
    GuiCtrlSetCursor(-1,0)

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

    $bool = 0

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

    GUISetState(@SW_SHOW)

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

    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $link
    shellExecute("http://www.youtube.com/watch?v=-XCbpBUXU0w")
    EndSwitch
    WEnd

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

    Func _link()
    $ret = GUIGetCursorInfo()
    If $ret[4] = $link And Not $bool Then
    $bool = 1
    GUICtrlSetFont($link,8,400,4,"MS Sans Serif")
    ElseIf $bool And Not ($ret[4]=$link) Then
    $bool = 0
    GUICtrlSetFont($link,8,400,0,"MS Sans Serif")
    EndIf
    endfunc

    [/autoit]

    3 Mal editiert, zuletzt von Mainstream (26. Mai 2012 um 10:38)

  • Also bei mir funktionierts. Du musst natürlich nur noch "_link" in der While-Schleife auch aufrufen. Sonst kanns ja nicht gehen. Aber wenn ich das einfüge, gehts bei mir.

    Gruss Shadowigor

  • Shadowigor

    Tut mir Leid, ich versteh dich nicht, wie fügst du das ein gib mir mal bitte ein Beispiel
    Ich wollte den Text ja unterstrichen haben wenn man mit der Maus rübergeht, aber ich glaube so wird das nichts

  • Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 623, 442, 192, 124)
    GUISetState(@SW_SHOW)

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

    $link = GUICtrlCreateLabel("link here", 50, 30, 100)
    GuiCtrlSetColor(-1,0x0000FF)
    GUICtrlSetFont(-1, 11, 700,2, "Arial")
    GuiCtrlSetCursor(-1,0)

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

    $bool = 0

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

    GUISetState(@SW_SHOW)

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

    #EndRegion ### END Koda GUI section ###

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

    While 1
    _link()
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $link
    shellExecute("http://www.youtube.com/watch?v=-XCbpBUXU0w")
    EndSwitch
    WEnd

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

    Func _link()
    $ret = GUIGetCursorInfo()
    If $ret[4] = $link And Not $bool Then
    $bool = 1
    GUICtrlSetFont($link,8,400,4,"MS Sans Serif")
    ElseIf $bool And Not ($ret[4]=$link) Then
    $bool = 0
    GUICtrlSetFont($link,8,400,0,"MS Sans Serif")
    EndIf
    endfunc

    [/autoit]
  • Danke dir $var, so oft wie du mir schon geholfen hast ich müsste dich eigendlich bezahlen :thumbup:

  • Irgendwo scheint hier ein Fehler drin zu sein, nach dem Compilieren funktioniert die exe nicht... wenn man im Hintergrund irgendetwas anders anklickt kommt dann immer gleich diese Fehlermeldung

    "Line 31 (File "C:\Dokumente und Einstellungen\Ich\Destop\Autolt v3 Script.au3): If $ret[4] = $link And Not $bool Then If $ret ERROR Error: Subscipt used with non-Array variable"

    Vielleicht weiß einer wo der Fehler ist und was man da machen kann, ich hab ehrlich gesagt keine ahnung :(

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 623, 442, 192, 124)
    GUISetState(@SW_SHOW)

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

    $link = GUICtrlCreateLabel("link here", 50, 30, 100)
    GuiCtrlSetColor(-1,0x0000FF)
    GUICtrlSetFont(-1, 11, 700,2, "Arial")
    GuiCtrlSetCursor(-1,0)

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

    $bool = 0

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

    GUISetState(@SW_SHOW)

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

    #EndRegion ### END Koda GUI section ###

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

    While 1
    _link()
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $link
    shellExecute("http://www.youtube.com/watch?v=-XCbpBUXU0w")
    EndSwitch
    WEnd

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

    Func _link()
    $ret = GUIGetCursorInfo()
    If $ret[4] = $link And Not $bool Then
    $bool = 1
    GUICtrlSetFont($link,8,400,4,"MS Sans Serif")
    ElseIf $bool And Not ($ret[4]=$link) Then
    $bool = 0
    GUICtrlSetFont($link,8,400,0,"MS Sans Serif")
    EndIf
    endfunc

    [/autoit]

    Einmal editiert, zuletzt von Mainstream (26. Mai 2012 um 03:21)