mIRC Home    About    Download    Register    News    Help

Print Thread
/scrollwindow #267077 31/03/20 12:42 PM
Joined: Feb 2015
Posts: 94
kap Offline OP
Babel fish
OP Offline
Babel fish
Joined: Feb 2015
Posts: 94
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.

Last edited by kap; 31/03/20 01:03 PM.

GNU Terry Pratchett
Re: /scrollwindow [Re: kap] #267088 01/04/20 02:34 PM
Joined: Jul 2006
Posts: 3,697
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,697
Yep, it would be useful. I would like to see this as well.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: /scrollwindow [Re: kap] #267106 03/04/20 06:43 PM
Joined: Feb 2011
Posts: 343
K
KindOne Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Feb 2011
Posts: 343
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.


irc.swiftirc.net #msl (mIRC Scripting Language)
Re: /scrollwindow [Re: KindOne] #267107 03/04/20 09:00 PM
Joined: Jul 2006
Posts: 3,697
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,697
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.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: /scrollwindow [Re: KindOne] #267109 03/04/20 10:15 PM
Joined: Feb 2015
Posts: 94
kap Offline OP
Babel fish
OP Offline
Babel fish
Joined: Feb 2015
Posts: 94
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...


GNU Terry Pratchett