mIRC Home    About    Download    Register    News    Help

Print Thread
Simple suggestion for making multi-spaces possible #181730 29/07/07 11:26 PM
Joined: Jun 2007
Posts: 35
alephresh Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Jun 2007
Posts: 35
[Scripting engine suggestion, primarily for advanced scripters]

How about allowing us to call mIRC's built-in /commands as $identifiers, with a prefix such as "$/"? It would provide a way around the good ol' space issues:

Code:
  var %five_spaces = $str($chr(32),5)

  ; echo a line of five spaces in the status window
  noop $/echo(-s %five_spaces)

  ; overwrite the 3rd line in control #1 in myDialog, with five spaces
  noop $/did(-o myDialog 1 3 %five_spaces)

"$./" could be used for silencing output.

Oh, and to make the solution complete, an untokenized version of $1- would be needed in events. I'd call it $args. smile (The classic use is in the "on INPUT" event, where $rawmsg is unavailable.)

Last edited by alephresh; 30/07/07 12:10 AM.

Desired: right alignment of text; consecutive spaces in /command args; Ctrl+A in custom dialogs.
Re: Simple suggestion for making multi-spaces possible [Re: alephresh] #181740 30/07/07 10:55 AM
Joined: Jun 2007
Posts: 35
alephresh Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Jun 2007
Posts: 35
(Sorry for repeatedly editing/correcting myself, I'm a bit obsessive.) frown

Apparently the "noop" is unnecessary since such quasi-identifiers would always return $null.

Anyway, I think this solution of $/ and $args would be really great because it solves a huge problem without any complications (presumably). Pretty please? blush


Desired: right alignment of text; consecutive spaces in /command args; Ctrl+A in custom dialogs.
Re: Simple suggestion for making multi-spaces poss [Re: alephresh] #181754 30/07/07 04:17 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I like the idea, but $/ already has a purpose: it lets you call custom identifiers even if they share their names with built-in ones.

Code:
alias time { return ... }


//echo -a $/time

Re: Simple suggestion for making multi-spaces poss [Re: hixxy] #181755 30/07/07 04:40 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
How the hell did you figure that one out? It's not documented in the index keywords (of the help file) nor is it found on a search of the help file...

Cool, btw... smile


NaquadaBomb
www.mirc-dll.com
Re: Simple suggestion for making multi-spaces possible [Re: alephresh] #181756 30/07/07 04:50 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
I'd rather see an identider that wraps the entire command...

Code:
  var %five_spaces = $str($chr(32),5)
  $command(.did -o myDialog 1 3 %five_spaces)




NaquadaBomb
www.mirc-dll.com
Re: Simple suggestion for making multi-spaces poss [Re: NaquadaServ] #181757 30/07/07 04:57 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I can't remember. I hardly ever discover parser stuff myself, usually pick it up from here or on IRC.

I blame qwerty :p