WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: theorem5 on July 09, 2020, 12:34:11 PM

Title: Hyperlink text in a message
Post by: theorem5 on July 09, 2020, 12:34:11 PM
Is there a way to hyperlink text in a message?  Something like:

Display(5,"test Site","test <a href='www.winbatch.com'>Winbatch Site</a>")
Title: Re: Hyperlink text in a message
Post by: td on July 09, 2020, 01:15:27 PM
You are attempting to use HTML tags and the Display function knowns nothing about rendering HTML.  You do have several options using WIL Dialogs.  One would be to create a dialog that imitates the appearance of the Pause message box but with an embedded HTML control. See

https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/Internet_Explorer_COMCONTROL.htm (https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/Internet_Explorer_COMCONTROL.htm)

Another option would be to simply add a flat style button to the dialog with your URI as text and then respond to the button press in your dialog's user-defined-callback procedure.
Title: Re: Hyperlink text in a message
Post by: theorem5 on July 09, 2020, 01:41:44 PM
td,

Thanks for the reply.  I should have thought this through a bit more before posting.  I am building a message string that is being posted to another application via the iHttpOpen function.  The other application the does some things and then emails out the message.  The message is sent successfully, but the text is not getting hyperlinked.  It just displays it as

<a href='www.winbatch.com'>Winbatch Site"

in the email sent.  My guess is that because of how I am building the message, the other app is not interpreting it correctly.

Any thoughts?
Title: Re: Hyperlink text in a message
Post by: td on July 09, 2020, 02:07:36 PM
Not sure if it is a cut & paste problem or not, but your HTML tag is ill-formed. Outside of that, whatever it is that you describe as "application" presumedly has some documentation that you could consult for some insights into its expectations and requirements.
Title: Re: Hyperlink text in a message
Post by: JTaylor on July 09, 2020, 04:15:13 PM
In addition to Tony's comments, is the email being sent as an HTML email or Plain text.   If plain text that would result in what you are seeing, assuming I understand.

Jim
Title: Re: Hyperlink text in a message
Post by: td on July 10, 2020, 07:22:54 AM
The OP didn't mention how the text was being sent so this may be a bit of useless verbiage. But if the clipboard is being used to sending text, the following topic could prove enlightening:

https://forum.winbatch.com/index.php?topic=2269.msg11909#msg11909