Jump to content

Email or link in msgbox?


Recommended Posts

Here is an example on how to do it:

#include <GUIConstants.au3>
#include <IE.au3>

$Form1 = GUICreate("GUI with link text example", 321, 110, 193, 115)
$Label1 = GUICtrlCreateLabel("http://www.autoitscript.com", 88, 32, 136, 17)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Label1
            _IECreate("www.autoItscript.com")
    EndSwitch
WEnd
Edited by Volly
Link to comment
Share on other sites

Here is an example on how to do it:

#include <GUIConstants.au3>
#include <IE.au3>

$Form1 = GUICreate("GUI with link text example", 321, 110, 193, 115)
$Label1 = GUICtrlCreateLabel("http://www.autoitscript.com", 88, 32, 136, 17)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Label1
            _IECreate("www.autoItscript.com")
    EndSwitch
WEnd
Thx, its working now, but I have a little problem now. When I close the popup, the main gui also closes and I have some trouble only closing the popup now Edited by Hest
Software:Model Train Calculator (Screen)Autoit3 beginner!
Link to comment
Share on other sites

You will need to make a child window with the link. Look at the following example

#include <GUIConstants.au3>
#include <IE.au3>
$Form1 = GUICreate("Main window", 252, 139, 193, 115)
$Button1 = GUICtrlCreateButton("Click button to open child window", 32, 40, 185, 41, 0)
GUISetState(@SW_SHOW,$Form1)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            _childwin()
    EndSwitch
WEnd

func _childwin()
$Form2 = GUICreate("GUI with link text example", 321, 110, 193, 115)
$Label1 = GUICtrlCreateLabel("http://www.autoitscript.com", 88, 32, 136, 17)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUISetState(@SW_HIDE, $Form1)
GUISetState(@SW_SHOW, $Form2)
While 1
    $nMsg2 = GUIGetMsg()
    Switch $nMsg2
        Case $GUI_EVENT_CLOSE
            GUIDelete($Form2)
            Exitloop
        Case $Label1
            _IECreate("www.autoItscript.com")
    EndSwitch
WEnd
GUISetState(@SW_SHOW, $Form1)
EndFunc
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...