DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Alias - Display <string> in description?  (Read 7,187 times)

highend01

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 188
Alias - Display <string> in description?
« on: June 24, 2015, 09:12 AM »
One of my aliases uses:
Dictionary - <string> | http://dict.leo.org/ende?lp=ende&search=$$1 /ICON=icons\dictionary.ico

When I invoke it by entering e.g. "dic"
The description right from the icon states:
dict (Dictionary - )

So:
<string> is resolved to nothing

How do I escape it properly that <string> isn't resolved at all and I get instead:
dict (Dictionary - <string>)
« Last Edit: June 26, 2015, 07:36 PM by highend01 »

skajfes

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 267
Re: Alias - Display <string> in description?
« Reply #1 on: June 26, 2015, 02:52 PM »
You can use $$1 instead of <string> that will resolve to the string in the input field
It is impossible to make anything foolproof because fools are so ingenious.

highend01

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 188
Re: Alias - Display <string> in description?
« Reply #2 on: June 26, 2015, 04:19 PM »
How do I escape it properly that <string> isn't resolved at all and I get instead:
dict (Dictionary - <string>)
« Last Edit: June 26, 2015, 07:36 PM by highend01 »

skajfes

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 267
Re: Alias - Display <string> in description?
« Reply #3 on: June 26, 2015, 04:50 PM »
Ah, sorry, the <string> is evaluated because it is recognised as an html tag. I had a similar problem when writing a plugin for FARR some years back. As I remember, you can use regular html codes. so &lt; instead of < should do it
It is impossible to make anything foolproof because fools are so ingenious.

highend01

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 188
Re: Alias - Display <string> in description?
« Reply #4 on: June 26, 2015, 07:45 PM »
Thanks but unfortunately html tags don't work either.

Dictionary - &lt;string&gt; | http://dict.leo.org/ende?lp=ende&search=$$1 /ICON=icons\dictionary.ico

get's displayed without interpreting them:
dict (Dictionary - &lt;string&gt;)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Alias - Display <string> in description?
« Reply #5 on: June 27, 2015, 12:22 AM »
how strange.. i might have to look into this.

highend01

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 188
Re: Alias - Display <string> in description?
« Reply #6 on: June 27, 2015, 07:22 AM »
I'd appreciate this :)

Original address: https://www.donationcoder.com/forum/index.php?topic=41152.0