odiusfly's Recent Forum Activity

  • Choice 1: Imagine to write a big text with breaklines in a textbox inside construct 2.

    Choice 2: Now, the same text you can write in a .txt file on windows right? <-- Here is coming ajax plugin in case you want to insert in construct 2.

    Now you have a button.. Click and search for a "character, number whatever" inside your text.

    So this code, a regex code maybe to remove all the line of the "character, number whatever" and 1-2 (maybe 5-10) lines above and 1-2 (maybe 5-10) lines below.

    Hope you understand now! ; -)

    Kyatric

    Sorry, i edit my code example above.. You can see now!

  • No working.

  • Thank you for your reply.. but if i need to use a ready text from a file (ajax) for example, and don't want to use array? Can I?

    I think regex is the faster answer (or someone to find better idea of course), but unfortunately can't find the code which can remove above and below lines.

  • I find this: RegexReplace(Text.Text, ".*character.*\r?\n", "m", "")..

    .. But the result is to remove 1 line (the line with the "character" word) only.

    Can't find any regex to remove 1-2 lines above and 1-2 lines below for example.

  • Hey gus! I have an issue.. Is there any fast solution to remove lines of a text?

    Example:

    Hello there!
    This is a simple test.
    I need to remove this character and
    delete this line,
    and this line..
    Without remove this![/code:2tqvadkc]
    
    What i need, is to find the "character" word, and press delete button. After this to remove the lines above and below.. So to have this result:
    [code:2tqvadkc]This is a simple test.
    Without remove this![/code:2tqvadkc]
    
    Can i? Thank you!!!  ; -)
  • Nice work, Thanks! ; -)

  • Thank you!!! ; -)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey guys! Can someone help me to find the line of a character or number in text?

    I use 2 Text Plugins, 1 Text Box and 1 Button. So, we have:

    Text1 (Original):

    This is a test.
    Today!
    10
    Hello C2!!!
    100[/code:184pmp0f]
    
    [code:184pmp0f]TextBox -> I write "Today!"
    Button -> Click[/code:184pmp0f]
    
    Text2 (Result):
    [code:184pmp0f]1[/code:184pmp0f]
    
    To understand more, the lines of text as i think are:
    "This is a test." is 0
    "Today!" is 1
    "10" is 2
    "Hello C2!!!" is 3
    "100" is 4
    
    What i need to use? A Regex Search? Array? A simple method? Can someone help me? Thanks!
  • Hey guys!

    I use this code:

    System -->  Compare two values
    				int(left(TextBox.Text, 1))
    				?
    				9
    
    TextBox --> Set Text: "9"&TextBox.Text[/code:27rympyd]
    
    And the result of course is to have the number "9" at first all time. What can i do, when i write anything to have the number "9" at the end all time? Thanks!
  • ahr

    Awesome! ; -)

  • Hey guys! I have a project with:

    Textbox

    Button

    Browser

    So my question is: Can i replace the file?

    It's not important what file. For example i press the button and download "save" in my pc a "text1.txt" file.

    So, i change some lines in textbox and i press the button again. I don't want to save as a new file, because i will have files like:

    text1.txt , text1(1).txt, text1(2).txt, text1(3).txt, etc etc

    Need to use other method instead browser plugin? Thanks!

  • korbaach

    Ok Cool!!! Thanks again my friend.. ; -)

odiusfly's avatar

odiusfly

Member since 15 Jul, 2014

Twitter
odiusfly has 6 followers

Connect with odiusfly

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies