Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2007
    Posts
    452

    help with the code

    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.

  2. #2
    Join Date
    May 2006
    Posts
    5,380
    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

    strText = 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);
    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 object


    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!!

  3. #3
    Join Date
    Mar 2007
    Posts
    452
    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

  4. #4
    Join Date
    May 2006
    Posts
    5,380
    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!!

  5. #5
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    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

  6. #6
    Join Date
    Mar 2007
    Posts
    452
    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);

  7. #7
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    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)))))))==============================================

  8. #8
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    I'll contact Intrigued and have him post it then. Until then, its merely a "suggestion"

  9. #9
    Join Date
    May 2006
    Posts
    5,380
    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!!

  10. #10
    Join Date
    Mar 2007
    Posts
    452
    Code:
    String.Replace(strText, Old.." ", New.." ", false);
    or
    String.Replace(strText, " "..Old, " "..New, false);
    both didnt work Rizlauk !!!!

  11. #11
    Join Date
    May 2006
    Posts
    5,380
    lol, soz, i forgot a line of code

    try this
    Code:
    strText = Input.GetText("Input1");
    Old = Input.GetText("Input2");
    New = Input.GetText("Input3");
    strText = String.Replace(strText, Old, New, true);
    Input.SetText("Input1", strText);
    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 you
    Last edited by RizlaUK; 03-23-2007 at 01:01 PM.
    Open your eyes to Narcissism, Don't let her destroy your life!!

  12. #12
    Join Date
    Mar 2007
    Posts
    452
    thats perfect Rizlauk
    thanks alot

    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 you
    i will b waiting for that

Similar Threads

  1. Article: Using Authenticode Code Signing Certificates
    By Ted Sullivan in forum Setup Factory 8.0 Examples
    Replies: 4
    Last Post: 10-31-2007, 09:03 AM
  2. Progress Bars screen, On Start code is skipped
    By AxemanMK in forum Setup Factory 7.0
    Replies: 7
    Last Post: 09-21-2006, 02:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts