alkado Posted February 13, 2022 Share Posted February 13, 2022 So I am looking at a relatively simple albeit long script I need to compile, however it has been left as practically deprecated and I want to get it working. Now, the lines I need to work with are way over the character limit, and I'm seeing the lines broken up mid-string. Example from part of an array attached. I simply want to use a find/replace on the many instances of ' & ' with something that works, as this doesn't break the line the way I need it to, and thus I cannot compile it. I'm aware of manual ways to do this between strings of data, but I am dealing with a lot of code and would much rather make use these breaks as it would turn days of work into maybe an hour. I know that there's a chance that it simply cant be this easy, but I figured the least I could do is ask. Forgive me if this sounds stupid but this is not my area of expertise by any means. demo.txt Link to comment Share on other sites More sharing options...
Developers Jos Posted February 13, 2022 Developers Share Posted February 13, 2022 Moved to the appropriate forum. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Developers Solution Jos Posted February 13, 2022 Developers Solution Share Posted February 13, 2022 So the attached txt file is one line from your script that isn't working ....right? Just change the xxxx' & 'yyyy in that script to xxxx' & _ 'yyyy and things will work. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Nine Posted February 13, 2022 Share Posted February 13, 2022 You can use Notepad++ to perform a global replacement in extended mode : ' & ' with ' & _\r\n' “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Developers Jos Posted February 13, 2022 Developers Share Posted February 13, 2022 Just now, Nine said: You can use Notepad++ Or SciTE SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Nine Posted February 13, 2022 Share Posted February 13, 2022 Just now, Jos said: Or SciTE Really? how? reading the help file, it says that \r\n are not supported in Scintilla ! “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Developers Jos Posted February 13, 2022 Developers Share Posted February 13, 2022 (edited) 2 minutes ago, Nine said: how? This is SciTE functionality not Scintilla. Edited February 13, 2022 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Nine Posted February 13, 2022 Share Posted February 13, 2022 Oh, nice. I was trying with Regular expression... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Developers Jos Posted February 13, 2022 Developers Share Posted February 13, 2022 2 minutes ago, Nine said: I was trying with Regular expression That actually also works: SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Nine Posted February 13, 2022 Share Posted February 13, 2022 Quote \a, \b, \f, \n, \r, \t, \v match the corresponding C escape char, respectively BEL, BS, FF, LF, CR, TAB and VT; Note that \r and \n are never matched because in Scintilla, regular expression searches are made line per line (stripped of end-of-line chars). That's what mingled me...I was trying to search first and it was not working. Never really tried with just a replacement. Thanks Scite guru “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Developers Jos Posted February 13, 2022 Developers Share Posted February 13, 2022 I normally use the first option when just replacing tabs/CRs/LFs to keep things simple and not having to worry about any special regex characters, but it is quite useful ones you get the hang of it. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ad777 Posted February 13, 2022 Share Posted February 13, 2022 @alkado this should works for you i did little fix: demo.txt iam ِAutoit programmer. best thing in life is to use your Brain to Achieve everything you want. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 13, 2022 Developers Share Posted February 13, 2022 24 minutes ago, ad777 said: this should works for you i did little fix: What exactly was wrong with what we gave as solution ? ... and why such a complex alternative when standard concatenation spread over multiple lines works fine as well? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ad777 Posted February 13, 2022 Share Posted February 13, 2022 @Jos i give him just another solution,that all. iam ِAutoit programmer. best thing in life is to use your Brain to Achieve everything you want. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 13, 2022 Developers Share Posted February 13, 2022 I know but: The question whether this is really needed or just creating confusion? Your proposed solution as such is not one I would advice to use in general as I mentioned. Just putting it out there..... but you don't have to provide a solution in every posted thread. ad777 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
alkado Posted February 13, 2022 Author Share Posted February 13, 2022 Thanks for the quick and useful answers! All of your answers can help me out since I'm newer here, I just feel a little silly that the solution was that simple. And mods, thanks for moving this to the right place, forgive my ignorance. Link to comment Share on other sites More sharing options...
alkado Posted February 13, 2022 Author Share Posted February 13, 2022 Just to add. I love me some Notepad++, but its handy ability to keep files open in memory even if not saved has its usefulness reserved elsewhere for me. I use Atom for projects like this, a very handy program, and it is also capable of regex find and replace. Link to comment Share on other sites More sharing options...
alkado Posted February 13, 2022 Author Share Posted February 13, 2022 And, because I cant keep my thoughts organized, I'll add on this here third post that the code I'm dealing with is over 74,000 lines long, so any solution that bypasses having to manually enter even a single character outside of the replace tool is just not realistic seeing that I have that option to choose from already. Link to comment Share on other sites More sharing options...
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