Jump to content

GUI Hyperlink control


GaryFrost
 Share

Recommended Posts

I mean follow a link if the picture is clicked.

Global $Pic = GUICtrlCreatePic()

While 1
  $Msg = GUIGetMsg()
  Switch $Msg;; This is your normal Msg loop so treat it accordingly
    Case $Pic
      Shellexecute("http://my_url.com/");; here's where the action takes place
  EndSwitch
Wend

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

BIG THX

Another Question

the mouse cursor don´t change to a hand?

GUICtrlSetCursor($pic,0)

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Very BIG THX :)

No problem but I should point out that setting the cursor to 0 will not always set it to Hand. It sets it to the default cursor for the action which for a hyperlink is the hand.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

  • 1 year later...

i can't run the example file

C:\Users\Work\Documents\Scripts\links\GuiHyperLink.au3(97,38) : WARNING: $WM_USER: possibly used before declaration.
Global Const $LM_SETITEM = ($WM_USER +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\GuiHyperLink.au3(113,26) : WARNING: $WS_CHILD: possibly used before declaration.
    $style = BitOR($WS_CHILD,
    ~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\GuiHyperLink.au3(113,39) : WARNING: $WS_VISIBLE: possibly used before declaration.
    $style = BitOR($WS_CHILD, $WS_VISIBLE)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\HyperLink_Example.au3(20,33) : WARNING: $WS_DLGFRAME: possibly used before declaration.
            10, 10, 480, 40, $WS_DLGFRAME,
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\HyperLink_Example.au3(20,52) : WARNING: $WS_EX_CLIENTEDGE: possibly used before declaration.
            10, 10, 480, 40, $WS_DLGFRAME, $WS_EX_CLIENTEDGE)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\GuiHyperLink.au3(97,38) : ERROR: $WM_USER: undeclared global variable.
Global Const $LM_SETITEM = ($WM_USER +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\HyperLink_Example.au3 - 1 error(s), 5 warning(s)
Link to comment
Share on other sites

i can't run the example file

C:\Users\Work\Documents\Scripts\links\GuiHyperLink.au3(97,38) : WARNING: $WM_USER: possibly used before declaration.
Global Const $LM_SETITEM = ($WM_USER +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\GuiHyperLink.au3(113,26) : WARNING: $WS_CHILD: possibly used before declaration.
    $style = BitOR($WS_CHILD,
    ~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\GuiHyperLink.au3(113,39) : WARNING: $WS_VISIBLE: possibly used before declaration.
    $style = BitOR($WS_CHILD, $WS_VISIBLE)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\HyperLink_Example.au3(20,33) : WARNING: $WS_DLGFRAME: possibly used before declaration.
            10, 10, 480, 40, $WS_DLGFRAME,
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\HyperLink_Example.au3(20,52) : WARNING: $WS_EX_CLIENTEDGE: possibly used before declaration.
            10, 10, 480, 40, $WS_DLGFRAME, $WS_EX_CLIENTEDGE)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\GuiHyperLink.au3(97,38) : ERROR: $WM_USER: undeclared global variable.
Global Const $LM_SETITEM = ($WM_USER +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Work\Documents\Scripts\links\HyperLink_Example.au3 - 1 error(s), 5 warning(s)
...same here...even with Events.au3 and GuiHyperLink.au3 in place :D
Link to comment
Share on other sites

what about OrganizeIncludes?

--> #include<WindowsConstants.au3> before including GUIHyperlink :D

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Then there are some Constants in GUIHyperlink.au3 and Events.au3 wich are now declared in WindowsContstants...

Just remove the already declared constants mentioned in the errors from GUIHyperlink/Events

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

  • 2 years later...

Then there are some Constants in GUIHyperlink.au3 and Events.au3 wich are now declared in WindowsContstants...

Just remove the already declared constants mentioned in the errors from GUIHyperlink/Events

I had the same issues and followed this advice. worked perfect. Thanks ProgAndy!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...