Adding a web link to a dialog

Post complete new themes or wizard dialogs here.
boaz
Posts: 3
Joined: Wed Sep 01, 2010 8:05 am

Adding a web link to a dialog

Postby boaz » Wed Sep 01, 2010 8:07 am

Hi,

I saw in the help topic that a Label can act as a link, but I couldn't find out how to do it.

I want to place a link to the web on my dialog, how do I do it?

Thanks,
Boaz

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Adding a web link to a dialog

Postby mills » Wed Sep 01, 2010 8:34 pm

The documentation may be misleading. However, you could make it work for a label to work as an html link.

Create your GUI with the label you want to have a link. Double-click on the label in the designer.
Set 'Performs Action' to 'Return from Dialog':

link_label.jpg
link_label.jpg (106.49 KiB) Viewed 22447 times


Code: Select all

label: clicklink
Set Variable test to
Display Dialog: clicklink, wait for dialog to return (modal)
if Variable test Equals LABEL1
    Comment: Launch web link
  GoTo Label: clicklink
end


So, you'll have to figure out how to "launch the web link"

I tried using MSIcode 'Run Program' with "start http://link" but it wasn't working. You might be able to get 'Run Program As' to work.

Alternatively, you may need to look up the default web browser in Registry and use that to launch your link.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

boaz
Posts: 3
Joined: Wed Sep 01, 2010 8:05 am

Re: Adding a web link to a dialog

Postby boaz » Thu Sep 02, 2010 1:27 am

Thanks for your help :)

The problem is that I have 2 dialogs inside a wizard loop.
I can't set a label for some reason inside the loop.
and any way when I put the label outside it doesn't work...
I added a label called 'PrivacyClickedLabel' inside the dialog, and set it to 'return from dialog'

I attach my code:

Code: Select all

label: WelcomeLabel
wizard loop
Set Variable IsPrivacyClicked to
Display Dialog: welcome, wait for dialog to return (modal)
if Variable IsPrivacyClicked Equals PrivacyClickedLabel
  Run Program $PROGRAMFILES$\internet explorer\iexplore.exe http://gamebox.my-quick-search.com/privacy.aspx
  GoTo Label: WelcomeLabel
end
Display Dialog: wizard, wait for dialog to return (modal)
GoTo Label: Main Install
end


any idea??

Thanks.

HAHNmediaservice
Posts: 46
Joined: Sat Aug 28, 2010 9:41 am
Location: Germany
Contact:

Re: Adding a web link to a dialog

Postby HAHNmediaservice » Thu Sep 02, 2010 11:19 am

We have this working, here an example:

Assumed the name of your dialog is MYDIALOG. Put a BUTTON on the dialog, give the property name MYLINK. Doubleclick the button, select tab "Object Behavior", select the button in the "Control" drop-down and give as "Performs Action" = "Return from Dialog". Then in your code do the following:

Code: Select all

Display dialog: MYDIALOG, wait for dialog to return (modal)
if Variable WIZARD Equals MYLINK
    Run Program http://www.hahn-mediaservice.de
    GoTo Label: MYDIALOG
end

On clicking the button the default web-browser should open and navigate to http://www.hahn-mediaservice.de AND return to the dialog itself.

Instead of the button you could also use the image control without using an image (because this is transparent, we do this). Give the image control the property name MYLINK and it works the same way. Put the image control where ever you want ... over an image, over text, anywhere you like to.

P.S.: Never use "...\internet explorer\iexplore.exe" because (a) you are not sure if this browser is installed on the target maschine and (b) you are not sure if this browser is the users default.

Kind regards!
HAHN mediaservice
Inh. Irena Hahn
Seif-Wald-Ring 26
54329 Konz-Roscheid
Tel: +49 6501 6 03 96 79
Fax: +49 6501 9 22 31 29

mikKummerfeld
Posts: 252
Joined: Sat Dec 03, 2011 3:07 am
Location: Konstanz, Germany
Contact:

Re: Adding a web link to a dialog

Postby mikKummerfeld » Mon Apr 16, 2012 2:46 am

Thank you so much :)

Danke, hat mir sehr geholfen :) Schade, dass es nicht mit Labels (inkl. Hovereffekt) funktioniert :(
Kind regards

Heiko Kummerfeld
MIK GmbH

Setup developer for .NET BI Software (12 products)
Head of quality assurance
technical consultant


Return to “New Themes, Dialogs”

Who is online

Users browsing this forum: No registered users and 16 guests