Author Topic: Is it possible to have a 'clickable' link in an Alert window?  (Read 1650 times)

0 Members and 1 Guest are viewing this topic.

sln8458

  • Newt
  • Posts: 91
  • CMS Intellicad 9.0/10.0
Is it possible to have a 'clickable' link in an Alert window?
« on: February 17, 2021, 07:30:45 AM »
Hi All

As the Subject says, Is it possible to have a 'clickable' link in an Alert window?
if so any pointers?

Steve
There is no such  thing as a 'silly question' to those who do not know!

Jochen

  • Newt
  • Posts: 30
Re: Is it possible to have a 'clickable' link in an Alert window?
« Reply #1 on: February 17, 2021, 08:54:40 AM »

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: Is it possible to have a 'clickable' link in an Alert window?
« Reply #2 on: February 17, 2021, 09:59:28 AM »
In the default alert window? No (not that I've ever seen). I also do not think it's possible use to DCL so you may need to use OpenDCL.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

sln8458

  • Newt
  • Posts: 91
  • CMS Intellicad 9.0/10.0
Re: Is it possible to have a 'clickable' link in an Alert window?
« Reply #3 on: February 17, 2021, 10:00:41 AM »
In the default alert window? No (not that I've ever seen). I also do not think it's possible use to DCL so you may need to use OpenDCL.

Thanks John, that was what I thought.
Steve
There is no such  thing as a 'silly question' to those who do not know!

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: Is it possible to have a 'clickable' link in an Alert window?
« Reply #4 on: February 17, 2021, 10:02:22 AM »
Jochen, neither of those links answer the OPs question or is this something I am missing?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: Is it possible to have a 'clickable' link in an Alert window?
« Reply #5 on: February 17, 2021, 10:02:57 AM »
No problem, sln8458.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Is it possible to have a 'clickable' link in an Alert window?
« Reply #6 on: February 17, 2021, 10:25:36 AM »
As far as I'm aware, it's not possible to embed a hyperlink in a standard DCL or alert window, nor the dialog presented by the WSH popup method, therefore OpenDCL would be required (as John has suggested); however, an alternative that I've implemented in the past is to use a button to open the link (an example of this approach may be found on the 'About' dialog for my NumInc application).

BIGAL

  • Swamp Rat
  • Posts: 1396
  • 40 + years of using Autocad
Re: Is it possible to have a 'clickable' link in an Alert window?
« Reply #7 on: February 17, 2021, 08:19:59 PM »
What about a normal Radio Button Dcl can have ": paragraph" which is  equal to multi line text as the Alert part,

https://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-D2218ECC-14D9-453A-893C-5295B0813213

As the "Alert" part may vary would use say a list in a repeat and write a temporary dcl.

(setq fo (open (setq fname (vl-filename-mktemp "" "" ".dcl")) "w"))

Just draw what you want or use paint etc to make an image if this sounds like what you want.

Code: [Select]
(setq dcl_id (load_dialog "D:\\acadtemp\\test.dcl"))
(if (not (new_dialog "testAH" dcl_id))
(exit)
)
(action_tile "accept" "(done_dialog)")
(start_dialog)
(unload_dialog dcl_id)

Code: [Select]
testAH : dialog {
 label = "Alert message" ;
  : column {
 width =40 ;
: paragraph
{
  : concatenation
  {
    : text_part
    {
      label = "From BIGAL " ;
    }
    : text_part
    {
      label = "Info@alanh.com.au";
    }
  }
  : text_part {
    label = "A test for alert";
  }
}
spacer_1 ;
ok_cancel ;
}
}
« Last Edit: February 17, 2021, 08:32:19 PM by BIGAL »
A man who never made a mistake never made anything

sln8458

  • Newt
  • Posts: 91
  • CMS Intellicad 9.0/10.0
Re: Is it possible to have a 'clickable' link in an Alert window?
« Reply #8 on: February 22, 2021, 02:49:56 AM »
As far as I'm aware, it's not possible to embed a hyperlink in a standard DCL or alert window, nor the dialog presented by the WSH popup method, therefore OpenDCL would be required (as John has suggested); however, an alternative that I've implemented in the past is to use a button to open the link (an example of this approach may be found on the 'About' dialog for my NumInc application).

I had a look at Lees code and came up with this:
Code: [Select]
(startapp "C:\\Program Files\\Internet Explorer\\iexplore.exe" "www.intellicadms.com")Copied to the command line and Internet Explorer opens with the webpage in the code.

I attempted adding a new Button to my DCL linking to the webpage, it works on one DCL but not a 'child' (is that the correct term?) DCL

Here is the DCL:
Code: [Select]
///last button in Main Dialogue added for testing
        spacer;
: button {
label = "CMSIntellicad";
key = "wb1";
fixed_width = true;
alignment = centered;
}
}
}
//
// Start About dialog box
//

sln_piping_about : dialog {
label = "About SLN PIPING";

: button {
label = "CMSIntellicad";
key = "wb2";
fixed_width = true;
alignment = centered;
}
        spacer;

: list_box {
width =  71;
height =  20;
fixed_height =  true;
key = "sln_piping_about";
}
ok_only;
}
///

Ane here is the lsp:

Code: [Select]
;-----------------------------------------------------------------------;
  (action_tile "wb1" ;Web link 1
"(WWW1)"
); END ACTION TILE
;-----------------------------------------------------------------------;
  (action_tile "wb2" ;Web link 2
"(WWW1)"
); END ACTION TILE
;-----------------------------------------------------------------------;

;-----------------------------------------------------------------------;

(defun  WWW1 ()
(startapp "C:\\Program Files\\Internet Explorer\\iexplore.exe" "www.intellicadms.com") ;this works on the command line
)
;-----------------------------------------------------------------------;



What am I missing guys?
S
There is no such  thing as a 'silly question' to those who do not know!