Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: need help with the script
06-13-2010, 07:23 PM #1
- Join Date
- Jun 2010
- Thanked 0 Times in 0 Posts
need help with the script
i have this
VERSION BUILD=6650406 RECORDER=FX TAB T=1 URL GOTO=something.com TAG POS=2 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:id CONTENT=something1 SET !ENCRYPTION NO TAG POS=2 TYPE=INPUT:PASSWORD FORM=NAME:NoFormName ATTR=NAME:pw CONTENT=something1 SET !ENCRYPTION NO TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:NoFormName ATTR=NAME:pw2 CONTENT=something1 TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:email CONTENTemail@example.com TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=NAME:year CONTENT=%1964 TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:NoFormName ATTR=VALUE:Register!
now what i need is to change the code so the "something" in all CONTENT will change everytime. the math formula would be
[x]+1 where x = something
so it would end up as something1 ->something2->something3 and so on and on and on
any ideas how can i change it?
06-13-2010, 08:42 PM #2
- Join Date
- Feb 2010
- Thanked 3 Times in 3 Posts
I have no idea what all that is inside your <code></code> area. It sorta looks like something similar to ASP or something... I can't guess. So I'm gonna assume it's just a String literal.
If it is a String literal and you want to change values of "something" to one thing and "something1" to another thing, and so on, then all you need is regular expressions and the String's replace() method.
int x = 0;
var myString = "x + 1 = y";
myString = myString.replace("x", x);//replace first occurrence of x
myString = myString.replace(/x/g,x);//replace ALL occurrences of x