mIRC Home    About    Download    Register    News    Help

Print Thread
#267077 31/03/20 12:42 PM
Joined: Feb 2015
Posts: 138
kap Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Feb 2015
Posts: 138
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 - Looking for a mIRC help channel -> Check #mircscripting @ irc.swiftirc.net
kap #267088 01/04/20 02:34 PM
Joined: Jul 2006
Posts: 4,180
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,180
Yep, it would be useful. I would like to see this as well.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
kap #267106 03/04/20 06:43 PM
Joined: Feb 2011
Posts: 461
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 461
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.

KindOne #267107 03/04/20 09:00 PM
Joined: Jul 2006
Posts: 4,180
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,180
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.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
KindOne #267109 03/04/20 10:15 PM
Joined: Feb 2015
Posts: 138
kap Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Feb 2015
Posts: 138
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 - Looking for a mIRC help channel -> Check #mircscripting @ irc.swiftirc.net

Link Copied to Clipboard