|
Joined: Jan 2004
Posts: 509
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2004
Posts: 509 |
1)Can I choose what starting prefix command my aliases can be? The default is /.
For example.
/n /nick $1-
And.
\n /notify $1- | halt.
But of course, \n makes it /\n.
2)Can I make my aliases case-sensitive? For example, /c and /C.
Knowing that alias { command word, $1 = command, $2 = word, yet there is no way to retrieve the alias you typed. Anyone got an idea?
3)How would I be able to do a keyword search in a log file? But not actually opening the log file. So like, /wordsearch logfile.rtf and it will bring to me the first or most recent line that such a word has been used.
4)$calc. That only brings me to up to 6 decimal digits. Though using $round($calc()) you can lessen it. But, any idea on the ability to have more than 6 decimal digits?
5)Also, there is no way to change the color of previous text in a window/buffer?
Thanks.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I tried to do a few of the things you're asking about, unfortunately, with no success. However, for #3, you can search through the logs for a keyword(s) via the dialog brought up by accessing Tools - Log Files. This will allow you to call up specific logs that contain the keyword(s). Note that finding the actual keyword will require opening the log in a text editor, then searching again for the keyword. But it would save you from searching logs that don't contain the keyword.
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 759 |
1) its under "Other" in the mIRC options.
5) /loadbuf, /filter ? im no filter genius but i remember reading somewhere it can be done for channel windows so that makes me believe it can for anywindow.
$maybe
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
1. / well always work. and you may choose one other using alt-o/other/command prefix
2) no
3) /help $read, example $read( logfile, ntw, *word* , N )
4) Assuming your not using a big value ie: 23.123456 just multiple it by 1000, to make it 23123.456 , this $calc(23123.456 / 5) = 4624.6912 reprocess at display time to get you 4.6246912 (this is not an effiecnet solution)
5) Some changes on its own if you speced the Normal Text color, or if its ctrl-c color codes you can search and replace them, or if its a mass change then you could reassign the color of the Nth color *thats quite sneaky)
|
|
|
|
Joined: Jan 2004
Posts: 509
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2004
Posts: 509 |
1)Yes, I know how to set my default command prefix to / or \. But I want to be able to use both at the same time.
I'm assuming that can't happen in the same alias sheet. Perhaps an alias sheet with all aliases starting with / and another alias sheet with all aliases starting with \?
3)Mm, can I return the total megabytes of all the files in my log folder?
5)So, /color 0 0 changes color 0 to hex value 0. But will that change all my buffer colors currently?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
3) Yes. Try this code: alias logsize {
var %a = 1
while %a <= $findfile($logdir,*.*,0) {
var %file = $findfile($logdir,*.*,%a)
var %size = $calc(%size + $file(%file).size)
inc %a
}
echo -a $logdir is %size
}
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
1) aliases have NO leading prefix, if your putting one in your wasting harddrive space aliases /blah { echo -a blah? } ///blah { echo -a blah? } blah { echo -a blah? }
are all the same!
So set your prefix to \ then / and \ well work
3) //set -l %t 0 | echo Total files were $findfile(c:\log folder,*.*,0,inc %t $file($1-).size ) total size was %t bytes
5) yes (see RusselB's reply)
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
That's an extremely inefficient way to calculate the size of a folder, as you are stressing the $findfile identifier. You are looping with $findfile, which for every iteration has to go and scan all files in the $logdir, and above that, for each iteration has to look for the Nth file. Much preferable would be something like: ; Usage; $logsize alias logsize { var %a, %b = $findfile($logdir,*,0,inc %a $file($1-)) return $bytes(%a,m).suf } Note that when you try to use this method on large folders (as logdirs can get), that even this method will choke mIRC for a while. An alternative is using COM, which can pretty instantly return the size of huge folders. You could for example try $foldersize
|
|
|
|
|