how can i change a latter in input object ???
Rizlauk has the same function in his bbcoder project...
Professional Software Development Tools
how can i change a latter in input object ???
Rizlauk has the same function in his bbcoder project...
Last edited by GoOgLe; 03-23-2007 at 12:13 PM.
if you are doing what i think you are trying to do (convert the bbcode to html) then do something like this for each tag
but rather than setting the text in the input like this, id send it to a html file (Text.Witefromstring) in temp folder and view it in a browser objectstrText = Input.GetText("inp_main");
strText = String.Replace(strText, "{B}", "<B>", false);
strText = String.Replace(strText, "{/B}", "</B>", false);
--add more tags here
--and close out with this
strText = String.Replace(strText, "[", "<", false);
strText = String.Replace(strText, "]", ">", false);
Input.SetText("inp_main", strText);
EDIT, for the string replace tool, i just used some thing like this: (put in button on click?)
strText = Input.GetText("inp_main");
Old = Input.GetText("inp_old");
New = Input.GetText("inp_new");
String.Replace(strText, Old, New, false);
Last edited by RizlaUK; 03-23-2007 at 12:33 PM.
Open your eyes to Narcissism, Don't let her destroy your life!!
no i want to do what u have in ur bbcoder project:
2 inputs (1 input for latter or a word u want to change and for to change it to) and 1 progress button
also, it would help others when searching the forum if you titled your posts with the problem you are having rather than "help with code" every time
EDIT:
see above
Open your eyes to Narcissism, Don't let her destroy your life!!
GoOgLe,
If I may make a suggestion. When you post, make the title of the post indicative of what your asking rather than broadening the topic with a "Need Help" type of title. People are apt to skip over a post when the title/subject isn't something they feel they can help on. You could be missing out on some really good answers.
I've not been deputized by IR as the forum police, so this isn't by any means a forum rule per se. Just a couple years of expience of hanging out on this forum trying to offer what little I can.
Edit: @ RizlaUK.. In stereo, only I'm the echo. Ya beat me to it.
Last edited by Worm; 03-23-2007 at 12:39 PM. Reason: RizlaUK beat me to it
ok i will do that next time sorry for that
the code didnt work for me... i put the code button on click...
Code:strText = Input.GetText("Input1"); Old = Input.GetText("Input2"); New = Input.GetText("Input3"); String.Replace(strText, Old, New, false);
I don't think its appropriate for someone with less than 3,500 posts to be telling others what to do in this forum...![]()
Yeah right. Who's the only one here who knows the illegal ninja moves from the government?
()))))))))o)))))))==============================================
I'll contact Intrigued and have him post it then. Until then, its merely a "suggestion"![]()
lol worm, fastest poster in the west.......Draw.....lmao
Google, i remember having some troubles with that function, if i remember rightly i had to add a space either to the end or the begining of the edited string
like
String.Replace(strText, Old.." ", New.." ", false);
or
String.Replace(strText, " "..Old, " "..New, false);
give it a try and see what happens, i cant realy remember exactly what i did in the end but i know i added a space somewhere else it wouldent work
Open your eyes to Narcissism, Don't let her destroy your life!!
both didnt work Rizlauk !!!!Code:String.Replace(strText, Old.." ", New.." ", false); or String.Replace(strText, " "..Old, " "..New, false);
lol, soz, i forgot a line of code
try this
EDIT: BTW, this will change every instance of the word enterd, i am working on a function to search for one word at a time, when i got it working i'll share it wuth youCode:strText = Input.GetText("Input1"); Old = Input.GetText("Input2"); New = Input.GetText("Input3"); strText = String.Replace(strText, Old, New, true); Input.SetText("Input1", strText);
Last edited by RizlaUK; 03-23-2007 at 01:01 PM.
Open your eyes to Narcissism, Don't let her destroy your life!!
thats perfect Rizlauk
thanks alot
i will b waiting for thatEDIT: BTW, this will change every instance of the word enterd, i am working on a function to search for one word at a time, when i got it working i'll share it wuth you