|
Joined: Jun 2003
Posts: 67
Babel fish
|
OP
Babel fish
Joined: Jun 2003
Posts: 67 |
Ok decided since i need alot of help ill just make a final thread anyhow im having trouble i have a variable which is a string of other variables like %var1 = %var2 %var3 well wen i try to replace character in %var1 it doesnt process %var2 %var3 it just keeps them as %var2 %var3 any command to fix that
while (demi == nub) { inc %skill }
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
var %var1 = $replace(%var2 %var2, <replacer>, <Repalce_with>)
-KingTomato
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
Your question is slightly confusing, however these examples should help you out. I'll include both methods that use $eval and [ ].
%Myvar. [ $+ [ %var1 ] $+ . $+ [ %var2 ] ] $eval($+(%,Myvar.,%var1,.,%var2),2) %Myvar.var1.var2
% [ $+ [ %var1 ] $+ [ %var2 ] ] $eval($+(%,%var1,%var2),2) %var1var2
Good Luck. - Raccoon
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Jun 2003
Posts: 67
Babel fish
|
OP
Babel fish
Joined: Jun 2003
Posts: 67 |
ok sorry for not making my self clea. 4 AM here :S. i have dialog that allows u to enter variables ( http://bob.xteo.net/options.jpg) and it stores them as a variable well i need &replace and $remove to see %var1 as processed %var2 %var3 not as actaul text %var1 %var2
while (demi == nub) { inc %skill }
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
Lets try this again tomorrow. It's nearly 3:30 here aswell. (btw, that made no sense again. ) (600)
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
; pass it contents of above text field
alias filename {
var %a = 1, %filename
while ($gettok($$1, %a, 32)) {
var %filename = %filename $+ $ifmatch
/inc %a
}
return $replace(%filename, $+(%,HUD.Server), _____, $+(%,HUD.ip), ______, $+(%,HUD.map), ______, $+(%,HUD.comment), ______)
}
-KingTomato
|
|
|
|
Joined: Jun 2003
Posts: 67
Babel fish
|
OP
Babel fish
Joined: Jun 2003
Posts: 67 |
ok a few days have passed (my RAID drives went psycho) but heres my problem better described i have a dialog which the user inputs variables in the availible variables are %HLDR.IP %HLDR.Server %HLDR.Map %HLDR.Comment each of which contain a text/numeric string well those variables are set as %HLDR.Format so that the value of %HLDR.Format = %HLDR.IP %HLDR.Server (any order any amount thats just an example) well i need to strip spaces,slashs, and all other illegal file name characters but $replace($HLDR.Format,/,-) doesnt work because it treats %HLDR.Format as a list of the variable names not a list of the variable values hopefully that makes sense
while (demi == nub) { inc %skill }
|
|
|
|
Joined: Jun 2003
Posts: 67
Babel fish
|
OP
Babel fish
Joined: Jun 2003
Posts: 67 |
KingTomato is god like. Everyone bow to him.
while (demi == nub) { inc %skill }
|
|
|
|
Joined: Dec 2002
Posts: 109
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 109 |
It really shouldn't be.
var %a = Foo var %b = Bar var %c = %a %b
-- %c is now "Foo Bar"
var %c = $replace(%c,$chr(32),-)
-- %c is now "Foo-Bar"
Variable assignments are instant. There are no references in mIRC, unless you toy with evaluation order. But you haven't been.
<Ingo> I can't uninstall it, there seems to be some kind of "Uninstall Shield"
|
|
|
|
Joined: Dec 2002
Posts: 109
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 109 |
Oh wait, I've just figured out what you were doing. You were storing the variable names as plain text form for template-like usage. Ignore previous response.
<Ingo> I can't uninstall it, there seems to be some kind of "Uninstall Shield"
|
|
|
|
|