mIRC Home    About    Download    Register    News    Help

Print Thread
Demi's World #35672 11/07/03 07:35 AM
Joined: Jun 2003
Posts: 67
D
demitrix Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Jun 2003
Posts: 67
Ok decided since i need alot of help ill just make a final thread laugh 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
}
Re: Demi's World #35673 11/07/03 07:49 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
var %var1 = $replace(%var2 %var2, <replacer>, <Repalce_with>)


-KingTomato
Re: Demi's World #35674 11/07/03 07:51 AM
Joined: Feb 2003
Posts: 2,742
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,742
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!
Re: Demi's World #35675 11/07/03 08:18 AM
Joined: Jun 2003
Posts: 67
D
demitrix Offline OP
Babel fish
OP Offline
Babel fish
D
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
}
Re: Demi's World #35676 11/07/03 08:24 AM
Joined: Feb 2003
Posts: 2,742
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,742
Lets try this again tomorrow. It's nearly 3:30 here aswell.
(btw, that made no sense again. crazy) (600)


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: Demi's World #35677 11/07/03 08:33 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
; 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
Re: Demi's World #35678 14/07/03 12:13 AM
Joined: Jun 2003
Posts: 67
D
demitrix Offline OP
Babel fish
OP Offline
Babel fish
D
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
}
Re: Demi's World #35679 14/07/03 02:27 AM
Joined: Jun 2003
Posts: 67
D
demitrix Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Jun 2003
Posts: 67
KingTomato is god like. Everyone bow to him.


while (demi == nub) {
inc %skill
}
Re: Demi's World #35680 27/07/03 04:52 PM
Joined: Dec 2002
Posts: 109
T
tomalak16 Offline
Vogon poet
Offline
Vogon poet
T
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"
Re: Demi's World #35681 27/07/03 04:58 PM
Joined: Dec 2002
Posts: 109
T
tomalak16 Offline
Vogon poet
Offline
Vogon poet
T
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. wink

Ignore previous response.


<Ingo> I can't uninstall it, there seems to be some kind of "Uninstall Shield"