abberration Posted August 17, 2020 Share Posted August 17, 2020 (edited) Hi, I'm starting to work on a small script where it will display all open Explorer windows so you can select the window you want. Using Wingettext, it appears to use @CR instead of @CRLF. I'm trying to extract the address. A messagebox shows this: Quote Address: C:\Users\Satellite\Desktop\backup autoit backup autoit Namespace Tree Control Tree View ShellView However, writing it to a text file appears like this: Quote Address: C:\Users\Satellite\Desktop\backup autoitbackup autoitNamespace Tree ControlTree ViewShellView I have tried some code like this: $s = WinGetText("[ACTIVE]") $a2 = StringSplit($s, @CR) _ArrayDisplay($a2) $s = StringReplace($s, @CR, @CRLF) FileWrite("test.txt", $s & @CRLF) I have also thought about using stringregex to extract the address, but I cannot think of any way to make that happen. How can I detect where the address ends and/or eliminate the text that comes afterwards? Thanks! Edited August 17, 2020 by abberration Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
abberration Posted August 17, 2020 Author Share Posted August 17, 2020 Ok, I just figured it out. It uses @LF, not @CR. It works now. Thanks! Easy MP3 | Software Installer | Password Manager 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