Sign in to follow this  
Followers 0
saqib

adding a clickable link to GUI

8 posts in this topic




How can I add a clickable link to a GUI? What control do I need to use?

saqib

http://www.linkedin.com/in/encryption

All you need todo is have a label for the link. When someone clicks it then have a line like this

ShellExecute("www.google.com")


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

All you need todo is have a label for the link. When someone clicks it then have a line like this

ShellExecute("www.google.com")

Actually I want the link to be in a Edit Control (GUICtrlCreateEdit). Is that possible?

saqib

http://www.linkedin.com/in/encryption

Share this post


Link to post
Share on other sites

From Zedna. You may search fo that or also other hyperlink examples.

HTH, Reinhard

#NoTrayIcon
#include <Constants.au3>
#include <GUIConstants.au3>

Opt("GUICloseOnESC",1)
Opt("GUIOnEventMode",1)

$about = GuiCreate("About",215,150,-1,-1,BitOR($WS_CAPTION,$WS_SYSMENU))
GUISetOnEvent ($GUI_EVENT_CLOSE, "AboutOK" )
GUICtrlCreateIcon (@AutoItExe,-1,11,11)
GUICtrlCreateLabel ("App name 1.0",59,11,135,20)
GUICtrlSetFont (-1,10, 800, 0, "Arial"); bold
GUICtrlCreateLabel ("(c) 2005" & @CRLF & @CRLF & "Zedna",59,30,135,40)
$email = GUICtrlCreateLabel ("author@somewhere.com",59,70,135,15)
GuiCtrlSetFont($email, 8.5, -1, 4); underlined
GuiCtrlSetColor($email,0x0000ff)
GuiCtrlSetCursor($email,0)
GUICtrlSetOnEvent(-1, "OnEmail")
$www = GUICtrlCreateLabel ("www.autoitscript.com/forum/",59,85,140,15)
GuiCtrlSetFont($www, 8.5, -1, 4); underlined
GuiCtrlSetColor($www,0x0000ff)
GuiCtrlSetCursor($www,0)
GUICtrlSetOnEvent(-1, "OnWWW")
GUICtrlCreateButton ("OK",65,115,75,23,BitOr($GUI_SS_DEFAULT_BUTTON, $BS_DEFPUSHBUTTON))
GUICtrlSetState (-1, $GUI_FOCUS)
GUICtrlSetOnEvent(-1, "AboutOK")
GUISetState(@SW_SHOW, $about)

While 1 
    Sleep(100)
WEnd

Func OnEmail()
    Run(@ComSpec & " /c " & 'start mailto:author@somewhere.com?subject=Something', "", @SW_HIDE)
EndFunc

Func OnWWW()
    Run(@ComSpec & " /c " & 'start www.autoitscript.com/forum/', "", @SW_HIDE)
EndFunc

Func AboutOK()
    Exit
EndFunc

Func OnAutoItExit()
    GUIDelete($about)
EndFunc

Share this post


Link to post
Share on other sites

Who for the hell "Lobishomen".

Dis I overread somthing?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

From Zedna. You may search fo that or also other hyperlink examples.

HTH, Reinhard

The user wants it inside of an edit type control, like the RichEdit control does

You can get fancy with a HyperLink control also http://www.autoitscript.com/forum/index.ph...t=0&start=0

Edited by Lobishomen

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Thanks,

Loaded this fantastic example already down from GarFrost (the guy with the leather jacket).

Sometimes I read or write to fast.

Best regards, Reinhard

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