mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2018
Posts: 4
P
Self-satisified door
OP Offline
Self-satisified door
P
Joined: Nov 2018
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.

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard