adamchapman Posted December 21, 2013 Share Posted December 21, 2013 I'm trying to make a clickable link in a GUI with the following code: #include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) $hGUI = GUICreate("Test", 300, 200) $label = GUICtrlCreateLabel("www.autoitscript.com", 50, 80, 200, 30) GUICtrlSetFont(-1, 16, 100, 4) GUICtrlSetColor(-1, 0x000000) GUICtrlSetCursor($label,0) GUISetOnEvent($label, "labelFun") GUISetState() ; set loop to make GUI persistent: While 1 sleep(100) WEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func labelFun() ConsoleWrite("label clicked" & @CRLF) ShellExecute('http://www.autoitscript.com') ; open web site when clicking label EndFunc I don't even have a suggestion for why this doesn't work, I'm very confused! Thanks for any help offered Link to comment Share on other sites More sharing options...
mikell Posted December 21, 2013 Share Posted December 21, 2013 GUICtrlSetOnEvent($label, "labelFun") Invicore 1 Link to comment Share on other sites More sharing options...
adamchapman Posted December 21, 2013 Author Share Posted December 21, 2013 Wow that was fastĀ - thanks very much Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now