mIRC Home    About    Download    Register    News    Help

Print Thread
#122090 06/06/05 05:07 AM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
OP Offline
Fjord artisan
L
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.

#122091 06/06/05 05:42 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
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.

#122092 06/06/05 08:43 AM
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
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
#122093 06/06/05 09:01 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
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)

#122094 07/06/05 02:05 AM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
OP Offline
Fjord artisan
L
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?

#122095 07/06/05 02:16 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
3) Yes. Try this code:
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
}
 

#122096 07/06/05 05:32 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
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)

#122097 07/06/05 09:49 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
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


Link Copied to Clipboard