Text editing question!
Results 1 to 11 of 11

Thread: Text editing question!

  1. #1
    Tiller of Soil MaskRider's Avatar
    Join Date
    Jun 2005
    Location
    Alpine, CA in San Diego's beautiful back country!
    Age
    72
    Posts
    2,228

    Question Text editing question!

    How does one go about finding-replacing text in a standard text file- such as a layout file- so that the replace function gets rid of the entire line and does not leave a space? I am trying to thin out layout files so that I can offer a heavy and light version. I create an airfield layout file with lots of trees in it- all of them the same- wofi's stand of 5 palms. Then, to thin it out and create a light version of the layout file, I go into a text editing program- it doesn't make much difference which cause I haven't yet been able to accomplish what I want- and try to delete every other tree object line. Problem is that while I can easily get rid of the name part of the line I still have not figured out how to get rid of the rest of the string- the co-ordinate part that follows. I want to replace the entire line with nothing. I want everyother tree entry line to just disappear. Any ideas how to do this?

    Thanks!

    MR
    "A sandwich and a cup of coffee, and then off to violin-land, where all is sweetness and delicacy and harmony, and there are no red-headed clients to vex us with their conundrums.”

    ― Sherlock Holmes


    MR Downloads at SOH
    MR Albums at SOH MR Web Site

  2. #2
    Redding Army Airfield Allen's Avatar
    Join Date
    Dec 2007
    Location
    O85 Benton Field Airport
    Age
    36
    Posts
    5,460
    If .lay is standard text. I would think old Notepad would work. You'll have to right click Open than find Notepad on the list. You may want uncheck always use this program when opening this type of program.
    "Let Being Helpful Be More Important Than Being Right!" Some SOH Founder.

  3. #3
    Tiller of Soil MaskRider's Avatar
    Join Date
    Jun 2005
    Location
    Alpine, CA in San Diego's beautiful back country!
    Age
    72
    Posts
    2,228
    Thanks Allen. I probably didn't make myself clear. I already know how to open the .lay files in several different editors, Notepad. Wordpad, MSWord, Notepad++ and how to use the basic replace commands. I'm tryinmg to figure how to identify lines that contain a model name and not just replace the object name or delete the object name but delete the entire line that contains the object name. When I click "replace" I want the entire line containing the object name to disappear and leave behind no blank line.

    MR
    "A sandwich and a cup of coffee, and then off to violin-land, where all is sweetness and delicacy and harmony, and there are no red-headed clients to vex us with their conundrums.”

    ― Sherlock Holmes


    MR Downloads at SOH
    MR Albums at SOH MR Web Site

  4. #4
    SOH-CM-2018
    Join Date
    Jun 2005
    Location
    Llanelli and Oostwold
    Age
    67
    Posts
    240
    Try this online link: http://textmechanic.com/

    Then click the Remove Lines of Text Containing.. link.

    Past your file text in the big box, then paste the search text in the small box, e.g "MRTree1", then click, "Remove Lines Containing".
    I have always been a team player. I was once part of a human centipide.

  5. #5
    Tiller of Soil MaskRider's Avatar
    Join Date
    Jun 2005
    Location
    Alpine, CA in San Diego's beautiful back country!
    Age
    72
    Posts
    2,228
    Hi The Editor!

    That is a very interesting and useful website! However, what I need is something that will allow me to skip thru the "find this" hits and only delete every other one. In other words, I want it to stop after each find and give me the option of deleting or skipping to next.

    Notepad++ is kind of neat. With it, I can put a tik mark next to the lines I want to delete- every other one containing Palme03 for instance- and then choose "delete and collapse" all lines with a tik mark".

    I think I may end up sticking with Notepad++ for a while unless I can come up with some sort of macro to handle it for me- writing macros is not something I am very hip to.

    Thanks very much though. You never know what you are going to find if you ask!

    MR
    "A sandwich and a cup of coffee, and then off to violin-land, where all is sweetness and delicacy and harmony, and there are no red-headed clients to vex us with their conundrums.”

    ― Sherlock Holmes


    MR Downloads at SOH
    MR Albums at SOH MR Web Site

  6. #6
    SOH-CM-2018
    Join Date
    Jun 2005
    Location
    Llanelli and Oostwold
    Age
    67
    Posts
    240
    Try this site about Notepad++ Macros etc:

    http://superuser.com/questions/45265...n-notepad?rq=1
    I have always been a team player. I was once part of a human centipide.

  7. #7
    wouldn't just using the find work? then remove the row you want? i'll look at the .lay and get back to you.

    have you tried open office? it might have better features.
    "Courage is the discovery that you may not win, and trying when you know you can lose."-Tom Krause

    My works Here: http://www.thefreeflightsite.com/JFortin.htm

  8. #8
    it appears that find and next are it. then you are left with the position.

    if you leave out the item and save, will it open again in mission builder?

    i'll try that and get back to you.

    nope it doesn't like it. i was hopeing that it would ignore it.

    maybe you can add it to a spreadsheet and have it removed that way. then just paste it back into notepad.
    "Courage is the discovery that you may not win, and trying when you know you can lose."-Tom Krause

    My works Here: http://www.thefreeflightsite.com/JFortin.htm

  9. #9
    I think i have a solution.

    open .lay doc in notepad.

    select all and copy.

    paste in to a spreadsheet.

    now in the case of open office if you hold [Crtl] you can select multiple cells.

    once you have all that you want just delete them.

    then copy and paste back into notepad and save.

    easy enough. you can even use the find function.

    thats the best i've been able to come up with MR
    "Courage is the discovery that you may not win, and trying when you know you can lose."-Tom Krause

    My works Here: http://www.thefreeflightsite.com/JFortin.htm

  10. #10
    Tiller of Soil MaskRider's Avatar
    Join Date
    Jun 2005
    Location
    Alpine, CA in San Diego's beautiful back country!
    Age
    72
    Posts
    2,228
    Quote Originally Posted by Blood_Hawk23 View Post
    I think i have a solution.

    open .lay doc in notepad.

    select all and copy.

    paste in to a spreadsheet.

    now in the case of open office if you hold [Crtl] you can select multiple cells.

    once you have all that you want just delete them.

    then copy and paste back into notepad and save.

    easy enough. you can even use the find function.

    thats the best i've been able to come up with MR
    Excellent suggestion. I hadn't thought of handling it as a spreadsheet. Although Notepad++ kind of allows you to do so.

    Thanks!

    MR
    "A sandwich and a cup of coffee, and then off to violin-land, where all is sweetness and delicacy and harmony, and there are no red-headed clients to vex us with their conundrums.”

    ― Sherlock Holmes


    MR Downloads at SOH
    MR Albums at SOH MR Web Site

  11. #11
    Tiller of Soil MaskRider's Avatar
    Join Date
    Jun 2005
    Location
    Alpine, CA in San Diego's beautiful back country!
    Age
    72
    Posts
    2,228
    Quote Originally Posted by Blood_Hawk23 View Post
    it appears that find and next are it. then you are left with the position.

    if you leave out the item and save, will it open again in mission builder?

    'll try that and get back to you.

    nope it doesn't like it. i was hopeing that it would ignore it.

    maybe you can add it to a spreadsheet and have it removed that way. then just paste it back into notepad.
    Oh, yeah. I hadn't thought of just leaving the position data in the line minus the object name. But yes, CFS2 is pretty touchy. It expects information in those .lay files to presented in a certain fashion and if it isn't, it doesn't work.

    Thanks for checking it out.

    MR
    "A sandwich and a cup of coffee, and then off to violin-land, where all is sweetness and delicacy and harmony, and there are no red-headed clients to vex us with their conundrums.”

    ― Sherlock Holmes


    MR Downloads at SOH
    MR Albums at SOH MR Web Site

Similar Threads

  1. Question about editing aircraft starting points on the runway
    By mrjmaint in forum CFS3 General Discussion
    Replies: 2
    Last Post: January 28th, 2012, 10:48
  2. Hud Text
    By kwb737 in forum CFS2 General Discussion
    Replies: 3
    Last Post: December 4th, 2011, 09:52
  3. Carrier Tracks: Editing Question
    By expat in forum FSX General Discussion
    Replies: 2
    Last Post: March 20th, 2010, 09:11
  4. VC editing question
    By aeromed202 in forum FS 2002/2004 General Discussion
    Replies: 10
    Last Post: August 22nd, 2009, 14:39
  5. Mission hand-editing question...
    By Rami in forum CFS2 General Discussion
    Replies: 7
    Last Post: December 10th, 2008, 13:55

Members who have read this thread: 0

Bookmarks

Posting Permissions

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