hyperlink

  • HAb ne Frage
    und die wäre ich ab eine oberfläche ne stink normale mit koda erstelt hab den code dan würde ich gerne unten rechts ein link haben der anklickbar sein soll auf der oberfläche aber weiß leider nicht wie das geht hab mal was von hyperlink gelesen aber nicht so wirklich verstanden

    kann mia jemand helfen wie ich den link anklick bar machen kann

  • vlt bischen kleiner gestalten wens geht oder must das roman(Script) so lang sein?
    en ich jetzt ein script habe wo schon was ist wie bring ich das dann ein

    2 Mal editiert, zuletzt von Darki (2. September 2007 um 21:29)

    • Offizieller Beitrag

    Na dann wolln mir ma nicht so sein ;)

    Ich habe dir hier ein ganz einfaches Bsp. erstellt.

    Achte auf die Includes, dass die beiden notwendigen Dateien auch eingebunden werden.

    Edit: Vielleicht noch zum besseren Verständnis
    - Das Array $hl_ctrl[] enthält die Anzahl der Link-Controls
    - Das Array $Links[] nimmt die URL's auf
    - Das Array $Link_On[] enthält die Alias-Texte der Links
    Beachte:
    Jeder Alias-Text wird erkannt und innerhalb eines Link-Controls unterstrichen dargestellt.
    Demzufolge muss der Alias-Text bei der Erstellung des Link-Controls verwendet werden um als klickbarer Link zur Verfügung zu stehen.

    Spoiler anzeigen
    [autoit]

    Opt("WinTitleMatchMode", 4)
    #include "GuiHyperLink.au3"
    #include "Events.au3"
    #include <GUIConstants.au3>
    Local $hl_ctrl[1]
    Local $Links[1] = ["http://www.autoit.de/jgs_portal.php?sid="] ; Array mit der oder den URL
    Local $Link_On[1] = ["DIE deutsche AutoIt Community"] ; Array mit Anzeigetext für Link

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

    $GUI = GUICreate("Hyperlink Test", 400, 250, -1, -1)

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

    $hl_ctrl[0] = _GuiCtrlHyperLinkCreate ($GUI, _
    'Willkommen, hier ist' & @LF & 'DIE deutsche AutoIt Community', _
    $Links[0], $Link_On[0], _
    20, 20, 360, 40,-1, -1, "Courier New", 12)

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

    GUISetState(@SW_SHOW)
    GUIRegisterMsg($WM_NOTIFY, "WM_Notify_Events")
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]
  • Danke

    bloß ich ab noch ein problem der findet bei mia nicht den :
    GuiHyperLink.au3

    woher kan ich den bekommen ich hab noch autoit 3 eine ältere version und dann die erweiterung mit
    Editor: SciTE4AutoIt
    drauf gepackt hab dem noch kein :
    GuiHyperLink.au3

  • aso ja voll vergessen sry

    Trotzdem vielen DANK

    hab ima noch ein problem hoffe ich nerv nicht und zwar kommen imma fehler wenn ich den code einfüge:

    $hl_ctrl[0] = _GuiCtrlHyperLinkCreate ($GUI, _
    'Willkommen, hier ist' & @LF & 'DIE deutsche AutoIt Community', _
    $Links[0], $Link_On[0], _
    20, 20, 360, 40,-1, -1, "Courier New", 12)


    das sind die fehler meldungen :

    WARNING: $GUI: possibly used before declaration.
    $hl_ctrl[1] = _GuiCtrlHyperLinkCreate ($GUI,


    ERROR: $GUI: undeclared global variable.
    $hl_ctrl[1] = _GuiCtrlHyperLinkCreate ($GUI,

    Einmal editiert, zuletzt von Darki (3. September 2007 um 13:43)

  • Habs Probiert bloß es klappt nicht
    tauchen dann imma mehr fehler auf
    habs so gemacht min mia nicht sicher obs richtig ist aber glaub nicht :

    $hl_ctrl[0] = _GuiCtrlHyperLinkCreate ($variable = GUICreate("Box", 750, 600)
    'Willkommen, hier ist' & @LF & 'DIE deutsche AutoIt Community', _
    $Links[0], $Link_On[0], _
    20, 20, 360, 40,-1, -1, "Courier New", 12)

  • So musst du das machen...

  • Spoiler anzeigen
    [autoit]


    Opt("WinTitleMatchMode", 4)
    #include <GuiConstants.au3>
    #include <Date.au3>
    #include <file.au3>
    #include <GuiHyperLink.au3>
    #include <Events.au3>

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

    GuiCreate("SroToolBox", 750, 600)
    GUISetBkColor(0x00E0FFFF)

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

    Opt("TrayMenuMode",1)
    $info = TrayCreateItem("Über";)
    $hilfe = TrayCreateItem("Hilfe";)
    TrayCreateItem("";)
    $exit = TrayCreateItem("Exit";)
    TraySetState()

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

    GUICtrlSetState(-1,$GUI_ACCEPTFILES)
    GUISetState()

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

    GuiCtrlCreateLabel("?:", 560, 30)
    $bild = GUICtrlCreateButton(" Bild ", 560, 50)
    $map = GUICtrlCreateButton("Skarte", 620, 50)
    GuiCtrlCreateLabel(":", 560, 100)
    $bild = GUICtrlCreateButton(" Bild ", 560, 120)
    $map = GUICtrlCreateButton("karte", 620, 120)
    GuiCtrlCreateLabel(":", 560, 170)
    $bild = GUICtrlCreateButton(" Bild ", 560, 190)
    $map = GUICtrlCreateButton("karte", 620, 190)
    GuiCtrlCreateLabel(":", 560, 240)
    $bild = GUICtrlCreateButton(" Bild ", 560, 260)
    $map = GUICtrlCreateButton("karte", 620, 260)
    GuiCtrlCreateLabel(":", 560, 310)
    $bild = GUICtrlCreateButton(" Bild ", 560, 330)
    $map = GUICtrlCreateButton("karte", 620, 330)

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

    GuiCtrlCreateLabel("", 540, 335)
    GuiCtrlCreateLabel("", 540, 360)

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

    $GroupBox1 = GUICtrlCreateGroup("Info", 8, 8, 689, 505, -1, $WS_EX_TRANSPARENT)
    GUICtrlSetBkColor(-1, 0x00E0FFFF)
    $Label2 = GUICtrlCreateLabel("Version : /", 32, 32, 75, 17, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0x00E0FFFF)
    $Label1 = GUICtrlCreateLabel("Http://www.autoit.de", 512, 486, 172, 17)
    GUICtrlSetBkColor(-1, 0x00E0FFFF)
    $Group1 = GUICtrlCreateGroup("Game Start", 32, 54, 129, 65)
    GUICtrlSetBkColor(-1, 0x00E0FFFF)
    $Button1 = GUICtrlCreateButton("Start", 48, 78, 89, 25, 0)
    GUICtrlSetTip(-1, "C:/Programme/test ordner/test game.exe";)

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

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)

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

    GUISetState()
    While 1
    $nMsg = GUIGetMsg()
    $msg1 = TrayGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    ShellExecute("C:/Programme/test ordner/test game.exe";)
    Case $bild
    HotKeySet("{ESC}", "_esc";)
    SplashImageOn("", @ScriptDir & "\Bilder\Test Bild.gif", 200, 200, Default, Default, 1)
    $SplashOff = False
    While 1
    If $SplashOff Then ExitLoop
    Sleep(500)
    WEnd
    SplashOff()
    HotKeySet("{ESC}";)
    Case $map
    HotKeySet("{ESC}", "_esc";)
    SplashImageOn("", @ScriptDir & "\Bilder\Test Bild.jpg", 331, 266, Default, Default, 16)
    $SplashOff = False
    While 1
    If $SplashOff Then ExitLoop
    Sleep(500)
    WEnd
    SplashOff()
    HotKeySet("{ESC}";)
    Case $bild
    HotKeySet("{ESC}", "_esc";)
    SplashImageOn("", @ScriptDir & "\Bilder\Test Bild.gif", 200, 200, Default, Default, 1)
    $SplashOff = False
    While 1
    If $SplashOff Then ExitLoop
    Sleep(500)
    WEnd
    SplashOff()
    HotKeySet("{ESC}";)
    Case $map
    HotKeySet("{ESC}", "_esc";)
    SplashImageOn("", @ScriptDir & "\Bilder\Test Bild.jpg", 317, 278, Default, Default, 16)
    $SplashOff = False
    While 1
    If $SplashOff Then ExitLoop
    Sleep(500)
    WEnd
    SplashOff()
    HotKeySet("{ESC}";)
    Case $bild
    HotKeySet("{ESC}", "_esc";)
    SplashImageOn("", @ScriptDir & "\Bilder\Test Bild.gif", 200, 200, Default, Default, 1)
    $SplashOff = False
    While 1
    If $SplashOff Then ExitLoop
    Sleep(500)
    WEnd
    SplashOff()
    HotKeySet("{ESC}";)
    Case $map
    HotKeySet("{ESC}", "_esc";)
    SplashImageOn("", @ScriptDir & "\Bilder\Test Bild.jpg", 300, 326, Default, Default, 16)
    $SplashOff = False
    While 1
    If $SplashOff Then ExitLoop
    Sleep(500)
    WEnd
    SplashOff()
    HotKeySet("{ESC}";)
    Case $bild
    HotKeySet("{ESC}", "_esc";)
    SplashImageOn("", @ScriptDir & "\Bilder\Lord Bild.jpg", 200, 200, Default, Default, 1)
    $SplashOff = False
    While 1
    If $SplashOff Then ExitLoop
    Sleep(500)
    WEnd
    SplashOff()
    HotKeySet("{ESC}";)
    Case $map
    HotKeySet("{ESC}", "_esc";)
    SplashImageOn("", @ScriptDir & "\Bilder\Test Bild.jpg", 499, 328, Default, Default, 16)
    $SplashOff = False
    While 1
    If $SplashOff Then ExitLoop
    Sleep(500)
    WEnd
    SplashOff()
    HotKeySet("{ESC}";)
    Case $bild
    HotKeySet("{ESC}", "_esc";)
    SplashImageOn("", @ScriptDir & "\Bilder\Test Bild.jpg", 499, 328, Default, Default, 16)
    $SplashOff = False
    While 1
    If $SplashOff Then ExitLoop
    Sleep(500)
    WEnd
    SplashOff()
    HotKeySet("{ESC}";)
    Case $map
    HotKeySet("{ESC}", "_esc";)
    SplashImageOn("", @ScriptDir & "\Bilder\Test Bild.jpg", 499, 328, Default, Default, 16)
    $SplashOff = False
    While 1
    If $SplashOff Then ExitLoop
    Sleep(500)
    WEnd
    SplashOff()
    HotKeySet("{ESC}";)
    EndSwitch
    Select

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

    Case $msg1 = 0
    ContinueLoop
    Case $msg1 = $info
    MsgBox(64, "Info:", "^^" &@Lf& "" &@Lf&"Version: 0.1" &@Lf& "" &@Lf& "© 2007 by geheim", 10)
    Case $msg1 = $hilfe
    Msgbox(64, "Info:", "Mit ESC wird das Skript beendet." &@Lf& "" &@Lf& "Wenn ein Bild aufgerufen wurde, kann dies mit ESC beendet werden.", 20)
    EndSelect
    WEnd

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

    Func _esc()
    $SplashOff = True
    EndFunc

    [/autoit]
    • Offizieller Beitrag

    Opt("WinTitleMatchMode", 4)
    #include <GuiConstants.au3>
    #include <Date.au3>
    #include <file.au3>
    #include <GuiHyperLink.au3>
    #include <Events.au3>

    Das ist nur richtig, wenn die Dateien im Include-Verzeichnis von Scite gespeichert sind - sind sie das?

    Deine GUI hat keine Variable über die sie angesprochen werden kann.
    Und ich sehe hier nicht, dass du versuchst einen Hyperlink einzuinden.
    Du hast nur ein Label mit 'ner Web-Adresse geschrieben.