mIRC Homepage
Posted By: ScatMan command line problems - 27/06/03 01:07 PM
some commands like /var,/if and more doesn't work if u are using a single "/" in the editbox becuz it's trying to send the command to the server (it shouldn't do that and it doesn't do it in other commands, it should first check if there is such alias/command in the mirc and if it's doesn't so only then try to send it to the server)
/var %i = 1
send "var %i = 1" to the server
/if (1) blah
send "if (1) blah" to the server
i think it should fixed since it works in other commands
Posted By: starbucks_mafia Re: command line problems - 27/06/03 01:14 PM
Having /var %blah = 1 "work" from the commandline would be totally useless since it would mean pipes weren't processed and so the variable would be immediately destroyed since no other commands could use it. The same goes for /if - there's no point having an /if condition if the command block following it won't be executed.
Posted By: ScatMan Re: command line problems - 27/06/03 01:17 PM
it's useless but it's a bug anyway
Posted By: starbucks_mafia Re: command line problems - 27/06/03 01:20 PM
Why is it a bug? mIRC knows that the commands given to it are useless so it jumps to the conclusion that it might be useful if sent to the server. What's wrong with that?
Posted By: ScatMan Re: command line problems - 27/06/03 01:27 PM
cuz it shouldn't do that, if u want to send something to the server u could just do /raw var %i = 1
it doesn't matter what are u trying to do even if it's useless
and /if is useful if u don't want to evalute anything in your command (without using $(,0) ):
/if (1) echo -a $blah
and it should echo "$blah" (u can't use multiple commands cuz it won't evalute anything in the command(like "|" to a command separator))
Posted By: starbucks_mafia Re: command line problems - 27/06/03 01:31 PM
That /if example won't work because the /echo wouldn't be treated as a command.
Posted By: ScatMan Re: command line problems - 27/06/03 01:33 PM
why not ?
//if (1) echo -a test
does
Posted By: starbucks_mafia Re: command line problems - 27/06/03 01:37 PM
Yes, because it's got 2 //'s so the command is run also. Anyway, the point is that the /if is still totally pointless in that example and if you want it you can still use // instead. There's no reason mIRC shouldn't send the commands to the server, just as there's nothing wrong when it sends commands it doesn't recognise to the server.
Posted By: ScatMan Re: command line problems - 27/06/03 01:40 PM
ok.. but i still think that it's useful if u want it to not evaluate the command
Posted By: Techster Re: command line problems - 28/06/03 05:35 PM
Quote:
ok.. but i still think that it's useful if u want it to not evaluate the command


Just hold down the CTRL key when pressing enter, mIRC will send it exactly as it's typed to the server without trying to evaluate/run it.
Posted By: codemastr Re: command line problems - 28/06/03 06:03 PM
If you want to use /if from the command line, why not just use $iif?

// [ $+ [ $iif(1,echo -a $blah) ] ]
Posted By: Collective Re: command line problems - 28/06/03 06:05 PM
Because //if works fine? Its /if that doesn't.
Posted By: codemastr Re: command line problems - 28/06/03 06:09 PM
Well what I'm saying is, neither //if nor /if are really meant to be run from the command line. If you want in-expression conditionals, then that is what $iif is for.
Posted By: ScatMan Re: command line problems - 29/06/03 12:04 AM
your way evaluated too
i typed // [ $+ [ $iif(1,echo -a $me) ] ]
it echoed "Scat-Man" instead of "$me"
i think the /if should fixed cuz it's the best way to do that
Posted By: codemastr Re: command line problems - 29/06/03 12:14 AM
Then use $eval(...,0).
Posted By: ScatMan Re: command line problems - 29/06/03 12:32 AM
look at the 5th post in this thread
Posted By: starbucks_mafia Re: command line problems - 29/06/03 01:30 AM
Any way you look at it, /if is totally useless for what you want. If /if worked and it evaluated the command block (which it wouldn't necessarily) but didn't evaluate the identifiers then you're still left with the question: 'Why did I use /if (true_constant) just to get to the command?'.
Posted By: ScatMan Re: command line problems - 29/06/03 05:13 AM
there is no need to evaluate a command
evaluation is just for identifiers&variables to replace them by their value
i don't really gonna use this, but it's still a bug, it shouldn't do it since u can send something to the server with /raw


Posted By: starbucks_mafia Re: command line problems - 29/06/03 11:54 AM
By 'evaluate' I meant that the command would be treated as a command.

When you give mIRC an unrecognised command mIRC sees it won't do anything locally so it sends it to the server. When you give it /var, /if, or /while then the same is true, why shouldn't mIRC treat them the same way?
Posted By: ScatMan Re: command line problems - 29/06/03 12:20 PM
then why /remove isn't sent to the server when i'm using only one "/" ? the /if should work the same
Posted By: starbucks_mafia Re: command line problems - 29/06/03 05:38 PM
Because /remove doesn't require evaluation to be useful...
Posted By: tontito Re: command line problems - 30/06/03 01:26 PM
Sorry to be so rude but... some things buts must told...
ScatMan did you ever lost time to read me mirc.hlp or you are just trying to be the biggest Post maker in here??
If you did it, you would understand that some of the script commands are exe in the client "mirc" an when it doesn't recognize some it sends them to de server.
In your case why tha **** you need to make /if?
Why to you insist to look for bugs in mirc so desperately? Everybody knows your the biggest bug reporter here, to bad 98% of those bugs aren't bugs and the other 2% where already reported. Learn to script than while you are programming, if you find any problem, first try to resolve it using your head and mirc's documentation, then if you can't report the supposed problem.
If you are trying to exec some command in command line don’t forget to make duple //
And yes /if works for everyone, except you, try this
//if (scatman isin boring scatman) echo scatman is boring

your splay bug its another of those "bugs" that can be avoided.

Thanks
Posted By: pheonix Re: command line problems - 30/06/03 01:34 PM
hes saying why does it need the // instead of just /
Posted By: tontito Re: command line problems - 30/06/03 02:05 PM
ok, maybe because he was using commands that need evaluation... why do we must use [[ and ]] sometimes? because we need to evaluate what is inside.
The same is with if, while, echos with $gettok() ... where you want to test what is inside the ()

Is the "bug" solved? smile
Posted By: ScatMan Re: command line problems - 01/07/03 08:40 AM
if u want to know, i read the helpfile
it is a bug, it doesn't matter if it is useful or not
i'm not going to reply anymore is this thread and u shouldn't reply at all if [deleted by moderator]
next time u "must to say it" don't say it at all, keep it to yourself. [deleted by moderator]

Posted By: Collective Re: command line problems - 01/07/03 10:46 AM
ScatMan, you are one of the [edit] people on these forums, how can you possibly call other people stupid? A few days ago you had a go at codemastr who was actually telling you exactly what you needed to know, now you are calling tontito a moron and an idiot because he disagrees with you..codemastr was right, you do belong in the "I'm a 4yr old, be nice or I'll make fun of you" ignore list.

Lemme guess, I shouldn't reply either?
Posted By: ParaBrat Re: command line problems - 01/07/03 11:45 PM
Yegawds, i sometimes feel like i'm herding cats. WHY do you find it impossible to reply to someone without insults and name calling? Use common courtesy or dont post.
© mIRC Discussion Forums