mIRC Homepage
Posted By: kap /scrollwindow - 31/03/20 12:42 PM
I made a script for Peace and Protection called MENTION.PPA that - under certain conditions - shows a tip on the desktop when my nick is mentioned in a channel. When double-clicking on the tip it runs this command:
Code
if (!$appactive) showmirc -s $(|) scid $cid window -a $unsafe($chan)


It works well.

However by double-clicking I'd like to also go directly to the line in $chan that triggered the on TEXT event

I would like to float a feature suggestion whereby you can record a line number for a (channel) event and jump there with a (new) command: /scrollwindow $chan %savedlinenumber

Context: https://raw.githubusercontent.com/peace-and-protection/PnPAddons422/master/MENTION.PPA

edit: Maybe I should not have used the word 'line number', but 'bookmark' . Also I have been made aware by Ouims on IRC that this feature has been requested quite a lot in the past.
Posted By: Wims Re: /scrollwindow - 01/04/20 02:34 PM
Yep, it would be useful. I would like to see this as well.
Posted By: KindOne Re: /scrollwindow - 03/04/20 06:43 PM
Quote
However by double-clicking I'd like to also go directly to the line in $chan that triggered the on TEXT event


Would some code from "jaytea's Highlight Thing" work? I can single click and go directly to the channel window/line of the highlight.

http://hawkee.com/snippet/8471/

Lines 127 - 135 might interest you.
Posted By: Wims Re: /scrollwindow - 03/04/20 09:00 PM
It's based on /findtext to scroll to the line, but /findtext is extremely limited and doesn't allow you to accurately get the Nth line visible, it can fail on multiple line being the same.
Posted By: kap Re: /scrollwindow - 03/04/20 10:15 PM
Ah nice, thanks for that!

I see that it uses /findtext to go to the line mentioned. I talked with Ouims and he mentioned that as well, but also noted it is not as elegant as actually going to the line number that triggered the event.

Not sure if my feature suggestion still stands as it is, but if rejected I'll just end up using /findtext...
© mIRC Discussion Forums