Announcement

Collapse
No announcement yet.

Hyperlink

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hyperlink

    I am doing a custom page . And I want to do a hyperlink button . If button clicked Open browser to Url
    How am I doing it ?

  • #2
    Originally posted by jkript View Post
    I am doing a custom page . And I want to do a hyperlink button . If button clicked Open browser to Url
    How am I doing it ?
    Button > On Click:
    Code:
    File.OpenURL("http://google.com");

    Comment


    • #3
      Check the example where I showed you how to change the cursor. Go to the custom screen, open the On Ctrl Message tab, and see the code there to learn how to react to button clicks.

      You need something like this:
      Code:
      -- These actions are triggered by the controls on the screen.
      if (e_MsgID == MSGID_CLICKED) then
          -- a button was clicked
          if (e_CtrlID == CTRL_BUTTON_01) then
              File.OpenURL("http://www.domain.com", SW_SHOWNORMAL);
          end
      end
      Ulrich

      Comment


      • #4
        I am trying to do something similar. On my Welcome page is a message stating that this installer is for the English version... if a different language is needed, simply click to CANCEL to be redirected to the download page. So I added the OpenURL code to the Cancel action...

        Click image for larger version

Name:	suf-cancel.jpg
Views:	92
Size:	92.2 KB
ID:	305801

        But when I run the installer and select Cancel from the Welcome screen, nothing happens. The installer shuts down, no errors, no nothing.
        ArtistScope - Copy Protection & DRM Software

        Comment


        • #5
          What does Application.GetLastError() tell you?

          Ulrich

          Comment


          • #6
            I added that but no error was shown. However it did open the hyperlink. Then I removed that new code and it still opens the hyperlink... very strange. Now it works using the original code.
            ArtistScope - Copy Protection & DRM Software

            Comment

            Working...
            X