mIRC Home    About    Download    Register    News    Help

Topic Options
#264209 - 09/11/18 09:06 PM on HOTLINK - Match only partial word
PineappleJerky Offline
Self-satisified door

Registered: 09/11/18
Posts: 4
As discussed here, it would be great to have the ability to match only partial words with the on HOTLINK event:

Quote:
mIRC succeccfully recognises URLs when the protocol is connected to another word, e.g. "https://google.com" is hover-able and click-able in "wordhttps://google.com".

Quote:
As an example, I would like to match a single character inside a word. "e" should act as a hotlink in the word "hello", but "h" and "llo" should not.

Top
#264211 - 09/11/18 11:04 PM Re: on HOTLINK - Match only partial word [Re: PineappleJerky]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3438
Loc: France
Some clarifications:

I thought that getting the character directly under the mouse cursor would solve your issue, you would check if that's equal to 'e' and if so make it hotlinks...
However that doesn't work for all situations: for example if you wanted to hotlink if you are on the last 't' of "test", checking the letter under the cursor would fail, you would need to check the letter + the position of the letter in the word.

Something like $hotlink(mouse) returning the letter under the cursor and $hotlink(mouse).pos to get the position of the letter in the matched word.
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top