kraut1 Posted July 27 Posted July 27 (edited) ...ADDED LATER: 1 mistake found in my steps / see below Hi, I would like try to optimize some huge mission templates that contain huge numbers of not named blocks (all blocks have the same default name: Name = "Block"; For my planned optimization it is required that the blocks can be searched / found inside the Mission Editor. For this the to be searched blocks have to be renamed in the mission text file. And due to the fact, that some files contain ca. 60000 blocks this has to be done automaticly. Steps to be executed for the example to name all blocks of one type: example name all Model = "graphics\buildings\bench2.mgm"; blocks 1.) open mission text file (this could be done manually if the script / macro runs inside of a text editor) 2.) jump to the end of the file (this could be done manually if the script / macro runs inside of a text editor) 3.) search "upwards" for the block definition "graphics\buildings\bench2.mgm"; 4.) from the "found line" replace "upwards" Name = "Block"; by e.g.: Name = "SELECT"; 5.) from the line where the text was replaced repeat steps 1.)-4.) unless all blocks of the type "bench2" are renamed Example how it looks when done manually in Notepad++: 1.), 2.),3.) 4.) .added later: wrong is: after replacing one name the replace command searches automaticly the next Name = "block" which is wrong?? 5.) Repeat 1.)-4.) Note: I have already recorded a Macro in Notepad++, but this stops after the Name = "Block"; is found. And it seems to me that in Notebook++ it is not possible to view / and change the command line of a macro? (I am not a programmer) Many Thanks in advance! Edited July 27 by kraut1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now