mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2007
Posts: 35
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.
Joined: Jun 2007
Posts: 35
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.
Joined: Sep 2005
Posts: 2,881
H
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

Joined: Dec 2002
Posts: 580
N
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
Joined: Dec 2002
Posts: 580
N
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
Joined: Sep 2005
Posts: 2,881
H
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


Link Copied to Clipboard