|
Joined: Apr 2005
Posts: 1,008
Hoopy frood
|
OP
Hoopy frood
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 }
?
|
|
|
|
Joined: Sep 2005
Posts: 2,630
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,630 |
if ($input(Something:,de,Input Request) isnum) write system\file.txt $v1 $? is deprecated.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
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 } }
|
|
|
|
Joined: Sep 2005
Posts: 2,630
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,630 |
Even when using $? there's no need to use a %var: noop $?="blah"
; $! now contains the stuff you entered in the box
|
|
|
|
Joined: Apr 2005
Posts: 1,008
Hoopy frood
|
OP
Hoopy frood
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.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Apr 2005
Posts: 1,008
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,008 |
well i have to have 2 inputs coz it checks if inputed txt has #text or not :P
|
|
|
|
Joined: Sep 2005
Posts: 2,630
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,630 |
From google: In computer software standards and documentation, deprecation is the gradual phasing-out of a software or programming language feature.
|
|
|
|
Joined: Apr 2005
Posts: 1,008
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,008 |
ehm.. and in normal words? :P
|
|
|
|
Joined: Sep 2005
Posts: 2,630
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Apr 2005
Posts: 1,008
Hoopy frood
|
OP
Hoopy frood
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
|
|
|
|
Joined: Sep 2005
Posts: 2,630
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,630 |
var %input = $input(...)
if (#* !iswm %input) ...
else ...
|
|
|
|
Joined: Apr 2005
Posts: 1,008
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,008 |
thank you very much again ^^
|
|
|
|
|