Very simple Pm log checker

By slub77 on May 09, 2010

I made this to look at logs quick an easy, and i though since pretty much anyone can use it to post it here.

GOES IN REMOTES

Once it loads, right click > pm > select where your logs are

(normally in the main mirc fldier in program files and then the log flder in that)

Once you have done that, u can choose from any .log in that folder to check.

menu * {
  pm:/dialog -m mypm mypm
}
dialog mypm {
  Title Personal Message's
  size -1 -1 200 400
  combo 1, 1 10 198 10, drop
  edit ,2, 1 50 198 320, read, multi, hsbar, vsbar
  text ,3, 5 380 200 10
}

on *:DIALOG:mypm:init:*:{
  if !%logsdir { var %a $sfile(Here,Please go to the log Folder,This Folder) | set %logsdir $remove(%a,here)  }
  else { var %a 1 | var %b | while ($findfile(%logsdir,*.log,%a)) { if $chr(35) !isin $nopath($findfile(%logsdir,*.log,%a)) { did -o $dname 1 %b $nopath($findfile(%logsdir,*.log,%a)) | inc %b } | inc %a }
} }

on *:DIALOG:mypm:sclick:*:{ if $did == 1 { did -r $dname 2 | did -f $dname 2 | did -o $dname 3 $lines($findfile(%logsdir,$did(1,0).seltext,1)) | var %a $calc($lines($findfile(%logsdir,$did(1,0).seltext,1)) +1) | var %b 1 | while (%b != %a) { did -i $dname 2 %b $read($findfile(%logsdir,$did(1,0).seltext,1) , %b) | inc %b } } }

Comments

Sign in to comment.
WorldDMT   -  May 10, 2010

hi
did -o $dname 1 %b $nopath($findfile(%logsdir,*.log,%a))
can be

did -o $dname 1 %b $v2

u can use didtok with $regsubex instead of while loop

 Respond  
slub77   -  May 09, 2010

hmmm yes, i had trouble with that at one point i needing the , lol, so i skipped it and used the pipe.

 Respond  
Jethro   -  May 09, 2010

slub77, if you like to use pipes in your script to make a string of code to appear as a "one liner", you need to be aware of not making it too long, or else there may be a chance it gets cut off...when it's over the limit mirc allows. You can check out the use of line break identifier to remedy this matter.

This > var %a 1 | var %b can just be:

var %a 1, %b
 Respond  
slub77   -  May 09, 2010

i stick it on one line, because it looks more tidy, instead of a command on every line, for no reason

 Respond  
knoeki   -  May 09, 2010

You really need to place things on multiple lines instead of using pipes to seperate things. Makes it more readable and easier to debug...

Oh, and it's spelled "messages", not "message's" ;_)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.