mIRC Home    About    Download    Register    News    Help

Print Thread
How to get a popup on a logfile #258949 18/09/16 07:55 PM
Joined: Sep 2016
Posts: 5
W
willyw Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Sep 2016
Posts: 5
Hello,

After bringing up a logfile using the Log Files icon at the top, is there a way to get a pop up menu by right clicking on it?

Ultimately, I want to write a script that will do the same things that ctrl-f does - pop up a dialog box in which I can enter text to search for, with either an Up or Down button, without having to do ctrl-f with keys, but with point-n-click, on the displayed logfile.

I just had a quick search, and didn't find this. Sorry if I didn't search well. If you find it, I would be happy to be directed to it here.

Sort of a side note... not quite as important... but while I'm here:
What else - command or key board short cuts - are available for working with the log files? All I've found is /logview.
Is there anything that calls up the pop up Log Files menu, other than the Log Files icon?
Are there ways to work with that info (the list, search boxes, etc. ) other than that? (commands, etc.)
Just want to explore this....


Thank you.

Re: How to get a popup on a logfile [Re: willyw] #258958 20/09/16 12:18 AM
Joined: Aug 2003
Posts: 144
M
Miguel_A Offline
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
Hi

If you use the "/findtext" command you can simulate the "CTRL + F" option

"/findtext text" will search up
"/findtext -n text" will search down

The point 0 is always the last line you see.

Hope this help

Re: How to get a popup on a logfile [Re: Miguel_A] #258961 20/09/16 03:06 AM
Joined: Sep 2016
Posts: 5
W
willyw Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Sep 2016
Posts: 5
Originally Posted By: Miguel_A
Hi

If you use the "/findtext" command you can simulate the "CTRL + F" option

"/findtext text" will search up
"/findtext -n text" will search down


Yes, I know. I've already written scripts with it.

Quote:

The point 0 is always the last line you see.


I don't understand what you mean.

Quote:

Hope this help


No. Sorry. This doesn't address my question.

But thank you for taking time to write something.

Re: How to get a popup on a logfile [Re: willyw] #258972 20/09/16 02:59 PM
Joined: Aug 2003
Posts: 144
M
Miguel_A Offline
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
Hi

What i mean with the point 0 is the starting line to search up or down. And the point 0 is the last line that you can see on the window. The work will be start searching from that line (if the search is down or up from that point that depends if you are using the -n option or not).

Here you have a small and working example...
Has you know the dialog it was you that made i just add the mouse event (and others have already try it so it's working).

Code:
;This will check for any mouse event on that (@View) particular window, so make sure this piece of code is on top.
menu @View {
  ;It check in particular for the rclick event (right click mouse event)
  rclick:/dialog -m text_search text_search
}

;after this i guess what it does cause it was you that done it
Dialog text_search {
  title "Text searching"
  size -1 -1 400 110
  edit "",1, 15 30 150 20 %searchterm
  button "Up",2, 1 75 120 25,
  button "Down",3, 130 75 120 25,
  button "Close",4, 260 75 120 25, CANCEL
}
 
on 1:dialog:text_search:sclick:2: {
  ;/echo -a $did(1).text
  /findtext $did(1).text
}
 
on 1:dialog:text_search:sclick:3: {
  ;/echo -a $did(1).text
  /findtext -n $did(1).text
}

Re: How to get a popup on a logfile [Re: Miguel_A] #258973 20/09/16 04:50 PM
Joined: Sep 2016
Posts: 5
W
willyw Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Sep 2016
Posts: 5
Originally Posted By: Miguel_A


What i mean with the point 0 is the starting line to search up or down. And the point 0 is the last line that you can see on the window. The work will be start searching from that line (if the search is down or up from that point that depends if you are using the -n option or not).


Ok.
Thanks.

Quote:

Here you have a small and working example...
Has you know the dialog it was you that made i just add the mouse event (and others have already try it so it's [working).



No, sorry - it doesn't work.

Like I told you before you stopped responding in chat -
when I right click on a log file it does open the pop up search box, but it jumps away from the logfile window.
Thus, it does not search.

Thank you for showing me the
menu @View
command though. I will experiment with it some more.

If you have any thoughts on the current results and symptom that I've described here, please pass them along here. Thanks.

Re: How to get a popup on a logfile [Re: willyw] #258975 20/09/16 06:24 PM
Joined: Aug 2003
Posts: 144
M
Miguel_A Offline
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
Originally Posted By: willyw


No, sorry - it doesn't work.

Like I told you before you stopped responding in chat -
when I right click on a log file it does open the pop up search box, but it jumps away from the logfile window.
Thus, it does not search.

Thank you for showing me the
menu @View
command though. I will experiment with it some more.

If you have any thoughts on the current results and symptom that I've described here, please pass them along here. Thanks.



Ar you sure you don't have the code repeated or something ?
You canīt have two dialogue's with the same name and the menu part event need's to be on top...
Check as well on the status for any error

Re: How to get a popup on a logfile [Re: Miguel_A] #258980 21/09/16 04:23 AM
Joined: Sep 2016
Posts: 5
W
willyw Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Sep 2016
Posts: 5
Originally Posted By: Miguel_A

...
Ar you sure you don't have the code repeated or something ?


Yes.

Quote:

You canīt have two dialogue's with the same name and the menu part event need's to be on top...


Right.

Quote:

Check as well on the status for any error


No errors.


See:
/help /dialog
and note the -a switch.

I have experimented only very briefly with:
Code:
menu @View {
  rclick: /dialog -ma text_search text_search
}

See the -ma ?

It seems to have fixed it. I'll test more later, as I don't have a lot of time for it at the moment - but I wanted to report this so you could check it and test it for yourself.

Thanks.

Re: How to get a popup on a logfile [Re: willyw] #258992 22/09/16 02:57 PM
Joined: Aug 2003
Posts: 144
M
Miguel_A Offline
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
Hi

Well both of them work for me the only difference is that with out the a option the dialog will appear in the center of the mirc program and with the a it will appear on the center of the log window.

The a will work with the active window (the log in this case)

But good to know that it work's for you now them.

Re: How to get a popup on a logfile [Re: Miguel_A] #258994 22/09/16 03:27 PM
Joined: Sep 2016
Posts: 5
W
willyw Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Sep 2016
Posts: 5
Originally Posted By: Miguel_A
Hi

Well both of them work for me the only difference is that with out the a option the dialog will appear in the center of the mirc program and with the a it will appear on the center of the log window.


Which was exactly the problem, because if it appeared in the center of mIRC it was useless... as the log window was completely covered.

Quote:

The a will work with the active window (the log in this case)


Exactly the point.

Quote:

But good to know that it work's for you now them.


Thanks.
and hopefully anyone else that ever wonders, can find it here now too.