TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: sln8458 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
-
See Lee-Mac:
http://lee-mac.com/popup.html
Regards
Jochen
www.black-cad.de
-
In the default alert (https://www.theswamp.org/Sources/doc/avlisp/#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.
-
In the default alert (https://www.theswamp.org/Sources/doc/avlisp/#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
-
Jochen, neither of those links answer the OPs question or is this something I am missing?
-
No problem, sln8458.
-
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 (http://lee-mac.com/numinc.html) application).
-
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.
(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)
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 ;
}
}
-
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 (http://lee-mac.com/numinc.html) application).
I had a look at Lees code and came up with this:
(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:
///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:
;-----------------------------------------------------------------------;
(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