mIRC Home    About    Download    Register    News    Help

Print Thread
command line bugs #28306 05/06/03 02:26 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
when u are typing in the command line (editbox) this:
//command | command2 | %i = 1 | command3
so command and command2 will work but all after the command2 is not working, the bug is in the %i = 1, it can't be done in the editbox, i know i can do set %i 1 exect but the bug is in the %i = 1
and another bug is that u can't put identifiers/vars as a command in the editbox
i don't have examples cuz i'm a little confused with that (it works in some cases and in some doesn't) but maybe some of u know what i'm talking about



Re: command line bugs #28307 05/06/03 03:07 PM
Joined: Dec 2002
Posts: 25
V
v0id Offline
Ameglian cow
Offline
Ameglian cow
V
Joined: Dec 2002
Posts: 25
ScatMan wrote:

[snip]

Quote:
and another bug is that u can't put identifiers/vars as a command in the editbox


[snip]

It's not a bug:

(versions.txt)

03/02/2002 - mIRC v6.0

149.It is no longer possible to enter editbox commands that begin with an $identifier or %variable.

Re: command line bugs #28308 05/06/03 04:51 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
That's right, but mirc's tendency to consider %var in "%var = something" a command is a bit silly, don't you think?


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: command line bugs #28309 05/06/03 05:00 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Even stranger, perhaps, is that it will work if you use evaluation brackets around the %i, ie. [ %i ] = 1
I don't understand the logic behind why that would work at all.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: command line bugs #28310 05/06/03 05:53 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Yeah that does the trick. It seems that mirc checks for variables/idents as first words before it deals with the rest of the command (and whether it contains brackets etc). A possible scenario could be that mirc 'tokenizes' the editbox content with " | " as the separator
For each token it does this:
1. Checks the first char of each token to see if it's a "%" or a "$". If it is, it halts
2. Otherwise proceeds with the normal parsing/evaluation of that token
3. Then it deals with the next token in the same way.

This theory is compatible with the results of the following test:
Code:
alias cmdtest1 echo -s cmdtest1 | return one
alias cmdtest2 echo -s cmdtest2 | return two
Typing
Code:
//!.echo -q $cmdtest1 | %i [ $cmdtest2 ] whatever | echo -s end
makes mirc print only "cmdtest1". Notice how $cmdtest1 is evaluated, as mirc has not seen %i starting a command yet. But when it reaches the 2nd pipe-separated token, it sees %i and halts without evaluating $cmdtest2, even though the latter is inside brackets.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: command line bugs #28311 05/06/03 07:31 PM
Joined: Feb 2003
Posts: 307
T
tontito Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
Hello, its interesting to see that you find so many bugs, i can see at least 4 bug reports in the first page.
Question: you don't read the mirc.hlp or what?
Try to have more atention when you read the help m8.
I script for 5 yeares and didn't find that many bugs...

Re: command line bugs #28312 05/06/03 09:37 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
it IS a bug

Re: command line bugs #28313 06/06/03 02:55 AM
Joined: Feb 2003
Posts: 2,642
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,642
It is NOT a bug, as we already explaind.

What I find more interesting, is for someone who has more posts than I do under their belt, you sure seem very wet behind the ears.

As explaind to you earlier, mainly for security reasons to lessen various script exploits, you cannot start a command with a %variable or $identifier. If you wish to set the value of a %variable in the command line, the required method is to /set %var DATA or /var %var = DATA. The ability to %var = DATA is a luxury available only within script files.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: command line bugs #28314 06/06/03 02:58 AM
Joined: Mar 2003
Posts: 36
B
bugx Offline
Ameglian cow
Offline
Ameglian cow
B
Joined: Mar 2003
Posts: 36
I test your "bug"

//echo -a ok 1 | echo -a ok 2 | var %i = 3 | echo -a ok %i

ok 1
ok 2
ok 3

Works very fine. The diference is the word "var" and if
i can do that, you too of course

Re: command line bugs #28315 06/06/03 07:12 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
i said that the bug is in "%var = value" why don't u listen
i know that it can be done with set but the bug is with the
%var = value
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Re: command line bugs #28316 08/06/03 05:57 AM
Joined: Feb 2003
Posts: 2,642
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,642
* Raccoon blinks.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!