Jump to content
Sign in to follow this  
Hest

Email or link in msgbox?

Recommended Posts

Hest

Is it possible to put links or email in a msgbox? If not, whats the best way to do it?

Its ment to be an "about" box with some text, a link and a close button

Edited by Hest

Software:Model Train Calculator (Screen)Autoit3 beginner!

Share this post


Link to post
Share on other sites
Hest

The best way is to make a GUI and put in what you need. Putting in a link in a msgbox, not sure that is even possible.

Thx, I will try that instead. Can you direct me to a funktion or something, where I can learn how to make a link in the gui?


Software:Model Train Calculator (Screen)Autoit3 beginner!

Share this post


Link to post
Share on other sites
Bert

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

Share this post


Link to post
Share on other sites
Hest

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!

Share this post


Link to post
Share on other sites
Bert

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

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  

×