Sign in to follow this  
Followers 0
Chris_1013

Hyperlinks

4 posts in this topic

So, I'm looking at CompileAu3.exe, and on the 'Resource Hack' tab, it helpfully tells me where to go to get ResHacker.exe, along with a web address.

Hmm, pity I can't click it to go to the site. Are clickable hyperlinks ever gonna be a possibilty? Just thinking it'd be nice, although obviously you could simulate it with a button.

Share this post


Link to post
Share on other sites



Maybe my sample helps you a little bit :)

#include "GUIConstants.au3"

$maingui = GUICreate("Main",400,300)

$generalmenu = GUICtrlCreateMenu("General")
$preferencemenuitem = GUICtrlCreateMenuItem("Preferences...",$generalmenu)
$helpmenu = GUICtrlCreateMenu("?")
$helpmenuitem = GUICtrlCreateMenuItem("Help",$helpmenu)
GUICtrlCreateMenuItem("",$helpmenu)
$aboutmenuitem = GUICtrlCreateMenuItem("About...",$helpmenu)

$aboutgui = GUICreate("About",340,120,-1,-1,BitOr($WS_POPUP,$WS_CAPTION,$WS_SYSMENU),-1,$maingui)
$urlx = 140
$urly = 40
$urlw = 63
$urlh = 16
$gotourl = GUICtrlCreateLabel("Homepage",$urlx,$urly,$urlw,$urlh)
GUICtrlSetFont(-1,-1,-1,4)
GUICtrlSetColor(-1,0x0020FF)
$aboutok = GUICtrlCreateButton("OK",250,85,70,20)

$preferencegui = GUICreate("Options",340,190,-1,-1,BitOr($WS_POPUP,$WS_CAPTION,$WS_SYSMENU),-1,$maingui)
$prefstree = GuiCtrlCreateTreeView(10,10,320,140,BitOr($TVS_CHECKBOXES,$TVS_DISABLEDRAGDROP),$WS_EX_CLIENTEDGE)
$pref1 = GuiCtrlCreateTreeViewItem("Pref 1",$prefstree)
$pref2 = GuiCtrlCreateTreeViewItem("Pref 2",$prefstree)
$pref3 = GuiCtrlCreateTreeViewItem("Pref 3",$prefstree)
$pref4 = GuiCtrlCreateTreeViewItem("Pref 4",$prefstree)
$pref5 = GuiCtrlCreateTreeViewItem("Pref 5",$prefstree)
$prefok = GUICtrlCreateButton("OK",135,160,70,20)

GUISwitch($maingui)
GuiSetState(@SW_SHOW)

$urlset = 0
While 1
    $msg = GUIGetMsg(1)
;Msgbox(0,"",$msg[0] & @LF & $msg[1] & @LF & $msg[2] & @LF & $msg[3] & @LF & $msg[4])
    $ctrlmsg = $msg[0]
    $win = $msg[1]
    $posx = $msg[3]
    $posy = $msg[4]
    
    Select
        Case $ctrlmsg = -3 And $win = $maingui
            ExitLoop
            
        Case $ctrlmsg = $preferencemenuitem
            GUISwitch($preferencegui)
            GuiSetState(@SW_SHOW)
            
        Case $ctrlmsg = $prefok Or ($ctrlmsg = -3 And $win = $preferencegui)
              GUISwitch($preferencegui)
               GuiSetState(@SW_HIDE)
            
        Case $ctrlmsg = $aboutmenuitem
            GUISwitch($aboutgui)
            GuiSetState(@SW_SHOW)
            
        Case $ctrlmsg = $aboutok Or ($ctrlmsg = -3 And $win = $aboutgui)
            GUISwitch($aboutgui)
             GuiSetState(@SW_HIDE)
        
        Case ($ctrlmsg = $GUI_EVENT_MOUSEMOVE Or $ctrlmsg = $GUI_EVENT_PRIMARYDOWN) And $win = $aboutgui
            If $posx >= $urlx And $posx <= $urlx + $urlw And $posy >= $urly And $posy <= $urly + $urlh Then
                If $urlset = 0 Then
                    GUICtrlSetColor($gotourl,0x20C020)
                    GUISetCursor(0)
                    $urlset = 1
                EndIf
                If $ctrlmsg = $GUI_EVENT_PRIMARYDOWN Then Run(RegRead("HKEY_CLASSES_ROOT\http\shell\open\command","") & " http://www.autoitscript.com/forum")
            Else
                If $urlset = 1 Then
                    GUICtrlSetColor($gotourl,0x0020FF)
                    GUISetCursor(-1)
                    $urlset = 0
                EndIf
            EndIf
        
    EndSelect
WEnd

GUIDelete()

Exit

Regards

Holger

Share this post


Link to post
Share on other sites

Yeah, very neat I like it, thanks :-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0