mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 87
T
Tat Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Jan 2003
Posts: 87
It's pretty easy to setup a dynamic varable. Although, without built in support for them you end up with stuff like:
Code:
% [ $+ ping. [ $+ [ $nick ] ] ]
or
[ % $+ [ ping. $+ [ $me ] ] ]


I suggest allowing a command like %(ping. $+ $nick) to be equal to [ % $+ [ ping. $+ [ $me ] ] ]. Also allowing stuff like $(Join. $+ $network) so that everything in the () directly concatinated is evaluated then checked against varables or aliases.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
$eval($+(%,Join.,$network),2) already works. OK so it's two identifiers but still it allows the code to be grouped into parentheses. And of course to get the variable name you simply remove the surrounding $eval().


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
You came pretty close to reality: $($+(%,Join.,$network),2) is the same as $eval($+(%,Join.,$network),2). Any other way to evaluate dynamic vars would be incompatible with the scripting language and would break scripts. For example, currently, you can have a variable named %(ping. Changes are worth breaking existing scripts only if they enhance functionality considerably, imo.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Jan 2003
Posts: 87
T
Tat Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Jan 2003
Posts: 87
Drat, you're right. I was assuming '(' & ')' weren't usable for varables. Oh well.


Link Copied to Clipboard