Zedna Posted July 16, 2005 Share Posted July 16, 2005 (edited) I searched forum but there are only complicated metods. Here is the simple one: 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 Note this is working fine on Win9x and also WinXP Here is full code of my example of About window with hyperlinks: expandcollapse popup#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 Screenshot: Edited July 20, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
w0uter Posted July 16, 2005 Share Posted July 16, 2005 limitation of links in @comspec: you cannot have &'s in your link. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
GaryFrost Posted July 16, 2005 Share Posted July 16, 2005 (edited) expandcollapse popupFunc _About($TITLE, $MAIN_WINDOW) Local $CLOSE, $LABEL, $LABEL2, $MSG, $ABOUT_WINDOW Local $ABOUT_TEXT = "CodeWizard" & @CRLF & _ "Purpose / Logic:" & @CRLF & _ " Help in Creating MessageBox, Dialogs, Colors, Fonts, Cursors for GUI" & @CRLF & @CRLF & _ "Modifications:" & @CRLF & _ " 03/14/05 - Started program" & @CRLF & _ " Last Modified date: 05/12/05" & @CRLF & @CRLF & _ "Devolopment Team:" Local $ABOUT_AUTHOR = "Gary Frost Programmer/Giuseppe Criaco" Local $MAILTO = "CustomPCs@charter.com;gcriaco@quipo.it" $ABOUT_WINDOW = GUICreate($TITLE, 500, 250, -1, -1, -1, -1, $MAIN_WINDOW) #Region --- CodeWizard generated code Start --- If Not IsDeclared('Cadet_Blue_3') Then Dim $Cadet_Blue_3 = 0x7AC5CD GUISetBkColor($Cadet_Blue_3) #EndRegion --- CodeWizard generated code End --- $LABEL = GUICtrlCreateLabel($ABOUT_TEXT, 10, 10, 450, 125) $LABEL2 = _GuiCtrlCreateHyperlink($ABOUT_AUTHOR, 27, 130, 443, 20, 0x0000ff, 'E-Mail ' & $MAILTO & " (comments/questions)") $CLOSE = GUICtrlCreateButton("Close", 200, 190, 85, 20) GUISetState() Do $MSG = GUIGetMsg() Select Case $MSG = $CLOSE ExitLoop Case $MSG = $LABEL2 _INetMail($MAILTO, "Regarding " & $TITLE, "") EndSelect Until $MSG = $GUI_EVENT_CLOSE GUIDelete($ABOUT_WINDOW) EndFunc ;==>_About ;=============================================================================== ; ; Function Name: _GuiCtrlCreateHyperlink() ; Description: Creates a label that acts as a hyperlink ; ; Parameter(s): $s_Text - Label text ; $i_Left - Label left coord ; [$i_Top] - Label top coord ; [$i_Width] - Label width ; [$i_Height] - Label height ; [$i_Color] - Text Color ; [$s_ToolTip] - Hyperlink ToolTip ; [$i_Style] - Label style ; [$i_ExStyle] - Label extended style ; ; Requirement(s): None ; Return Value(s): Control ID ; ; Author(s): Saunders <krawlie@hotmail.com> ; ;=============================================================================== Func _GuiCtrlCreateHyperlink($S_TEXT, $I_LEFT, $I_TOP, _ $I_WIDTH = -1, $I_HEIGHT = -1, $I_COLOR = 0x0000ff, $S_TOOLTIP = '', $I_STYLE = -1, $I_EXSTYLE = -1) Local $I_CTRLID $I_CTRLID = GUICtrlCreateLabel($S_TEXT, $I_LEFT, $I_TOP, $I_WIDTH, $I_HEIGHT, $I_STYLE, $I_EXSTYLE) If $I_CTRLID <> 0 Then GUICtrlSetFont($I_CTRLID, -1, -1, 4) GUICtrlSetColor($I_CTRLID, $I_COLOR) GUICtrlSetCursor($I_CTRLID, 0) If $S_TOOLTIP <> '' Then GUICtrlSetTip($I_CTRLID, $S_TOOLTIP) EndIf EndIf Return $I_CTRLID EndFunc ;==>_GuiCtrlCreateHyperlink Edited November 1, 2007 by GaryFrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
layer Posted July 16, 2005 Share Posted July 16, 2005 Geez, nice gafrost FootbaG Link to comment Share on other sites More sharing options...
GaryFrost Posted July 16, 2005 Share Posted July 16, 2005 Geez, nice gafrost <{POST_SNAPBACK}>Thanks goes to Saunders for the hyperlink function.forget to mention that it needs#include <Inet.au3> SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
therks Posted July 16, 2005 Share Posted July 16, 2005 I made that? I totally forgot. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
GaryFrost Posted July 16, 2005 Share Posted July 16, 2005 (edited) Yep, been using it for a while. Thanks. Edited July 16, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
tuape Posted July 16, 2005 Share Posted July 16, 2005 Thanks goes to Saunders for the hyperlink function.forget to mention that it needs#include <Inet.au3><{POST_SNAPBACK}>And #include <GuiConstants.au3>, obviously. Link to comment Share on other sites More sharing options...
therks Posted July 17, 2005 Share Posted July 17, 2005 Wait a sec.. there's no way I made that. That doesn't look like my coding style at all. I remember making A hyperlink function, but I don't think I added all those options... My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
GaryFrost Posted July 17, 2005 Share Posted July 17, 2005 Wait a sec.. there's no way I made that. That doesn't look like my coding style at all. I remember making A hyperlink function, but I don't think I added all those options...<{POST_SNAPBACK}> You gave the basics for it, I just added to it. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
PartyPooper Posted November 8, 2005 Share Posted November 8, 2005 Are there any plans to add the GuiCtrlCreateHyperlink function in Inet.au3 or are there now other ways to produce Hyperlink Labels? Link to comment Share on other sites More sharing options...
GaryFrost Posted November 9, 2005 Share Posted November 9, 2005 There might be other ways, hadn't thought of taking the time to create the template and document the above function and adding it in to the UDFs. Gary SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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