mIRC Home    About    Download    Register    News    Help

Print Thread
#132180 08/10/05 02:56 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
OP Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
My suggestion is for a $tab and/or $tabbed() identifier/command.

In custom windows it is possible to format so that tabs appear at a specific column location.
Quote from mIRC help file, /window command: The -t switch used to set the tab positions in a listbox.
Example: /window -t5,10,15 @test

And to align the text to those columns, you have to include a tab character between each section. The only ways that I know about to add a tab character from the script editing window is to use "sometext $+ $chr(009) $+ more text" or to copy and paste an actual tab character from another location (tab in the editor just shifts focus) and use it to separate the sections of text.

Anyway, to the point.

I suggest that a $tab identifier be added to take the place of the $chr(009) or an actual tab character.

I also suggest that a $tabbed() command/identifier be added where the arguments would be strings of text that would be returned separated by tabs.

I think that the latter suggestion would be the more useful of the two.

Obviously, both of those things could easily be added in a script, but then again, so could "alias true return 1" and "alias false return 0".

-genius_at_work

#132181 08/10/05 09:37 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
To get a tab you can type ctrl-i in both the editor and chan/custom/status windows.

#132182 09/10/05 12:00 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
Obviously, both of those things could easily be added in a script


yeah way to easily to make them worth adding out of the blue...
alias tab return $chr(9)
alias tabbed { var %r = $tab, %i = $0 | while (%i) { var %r = $+($tab,$($+($,%i),2),%r) | dec %i } | return $mid($left(%r,-1),2) }

Quote:
but then again, so could "alias true return 1" and "alias false return 0".


No they cant, at least in any constructive fashion...
alias true return 1
alias false return 0
//echo -a $!true = $true & $!false = $false
$true = $true & $false = $false

* built in identifiers cant be replaced, and any logical purpose of using /TRUE or /FALSE folowed by $RESULT eludes me.


PS: The TABBED identifier is prone to collapsing a script, since each passed parameter can be the max string length, you can potentially pass it more than it can return/ contain in the %r value. ex...
//echo -a $tabbed($str(a,400),$str(b,400))
aaaa....aaaa<tab>bbbb....bbbb
//echo -a $tabbed($str(a,400),$str(b,400),$str(c,400))
* String too long: $+ (line 2, tab&tabber.mrc)

This would be the case with a internal command also.


Link Copied to Clipboard