mIRC Home    About    Download    Register    News    Help

Print Thread
#149147 14/05/06 04:49 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
how can i for this:

/write $mircdirsystem\file.txt $$?="something:"

make checkup like: if (that_code_up isnum) { do things }

?

#149148 14/05/06 05:02 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Code:
if ($input(Something:,de,Input Request) isnum) write system\file.txt $v1


$? is deprecated.

#149149 14/05/06 05:07 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Quote:
how can i for this:

/write $mircdirsystem\file.txt $$?="something:"

make checkup like: if (that_code_up isnum) { do things }

?


do you mean that the data you want to write to the text file is what you want to check to see if it is a number?
alias something {
var %something = $$?="something here"
write $mircdirsystem\file.txt %something
if (%something isnum) { commands }
}

#149150 14/05/06 05:21 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Even when using $? there's no need to use a %var:

Code:
noop $?="blah"
; $! now contains the stuff you entered in the box

#149151 14/05/06 05:38 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
thanks =)

btw what does "deprecated" mean ?

~edit

i have small problems
in dialog when i press button i have this

if (#* !iswm $input(Something:,de,Input Request)) { .echo -a invalid channel name! | halt }
elseif (#* iswm $input(Something:,de,Input Request)) { write $mircdirsystem\spam_channels.txt $v1 }

thing is i have more IF's so i cant give ELSE
but on elseif it gives 2 input boxes... and it always writes #*
instead inputed text

Last edited by raZOR; 14/05/06 05:47 PM.
#149152 14/05/06 05:47 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
so for the OP

alias something {
write $mircdirsystem\file.txt $$?="something here"
if ($! isnum) { echo command }
}

although $? is depreciated (somewhat) it has flexabilities different from $input and is still in the help file under Aliases.

#149153 14/05/06 05:51 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
change it to $v2

also you have the $input twice

if (#* !iswm $input(Something:,de,Input Request)) { .echo -a invalid channel name! | halt }
elseif (#* iswm $input(Something:,de,Input Request)) { write $mircdirsystem\spam_channels.txt $v1 }

I think you should use a var %something = $input(Something:,de,Input Request)
and put the var in your if statements

Last edited by MikeChat; 14/05/06 05:54 PM.
#149154 14/05/06 05:58 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
well i have to have 2 inputs coz it checks if inputed txt has #text or not :P

#149155 14/05/06 06:00 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
From google:

Quote:
In computer software standards and documentation, deprecation is the gradual phasing-out of a software or programming language feature.

#149156 14/05/06 06:03 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
ehm.. and in normal words? :P

#149157 14/05/06 06:05 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
It means that over time $? became less and less useful and didn't fit in well, so eventually, $input was added to replace it. While there's nothing wrong with using deprecated features, it just doesn't make a lot of sense.

#149158 14/05/06 06:17 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
oh.. well in some simple ways $$? is better and faster imo :P

also =)
do oyu know how to fix my 2x input problem ? :P

#149159 14/05/06 06:20 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Code:
var %input = $input(...)
if (#* !iswm %input) ...
else ...

#149160 14/05/06 06:30 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
thank you very much again ^^


Link Copied to Clipboard