SomeoneFixThisShit Posted June 24, 2018 Share Posted June 24, 2018 Dim $cData = ClipGet(); Dim $split = StringSplit($cData, '\n', 1); MsgBox(0, "test", $split[0]) If I set $cData to "test\ntest" then it will work. But multiline data from the clipboard? It doesn't get split at all. And I tried \n, \r\n, @CR, @CRLF. ($split[0] is 1, even if I have a long multiline string in the clipboard) Link to comment Share on other sites More sharing options...
AutoBert Posted June 24, 2018 Share Posted June 24, 2018 i have no problem with clipboard using standard data: #include <Array.au3> $sData = 'Line 1\n' $sData &= 'Line 2\n' $sData &= 'Line 3\n' $sData &= 'Line 4' ClipPut($sData) $aSplit = StringSplit(ClipGet(), '\n', 1); _ArrayDisplay($aSplit) So you must find out which delimiter are used and maybe fine tune with StringRegExp for your needs. Are there any delimiters in clipboard data? Link to comment Share on other sites More sharing options...
mikell Posted June 24, 2018 Share Posted June 24, 2018 This language works nice if you do things as they should be done So you can't even make difference between the string '\n' and the newline macro @LF ? Please have a look at the help file before grumbling Dim $cData = ClipGet(); Dim $split = StringSplit($cData, @LF, 1); MsgBox(0, "test", $split[0]) Link to comment Share on other sites More sharing options...
Subz Posted June 24, 2018 Share Posted June 24, 2018 Paste your text into something like Notepad++ turn on symbols and you can see what characters you can split on,. As mikell and AutoBert have shown as long as you know the character to split on, it should work. If it doesn't its usually because something you've missed, not a bug in Autoit. "a good workman never blames his tools." FrancescoDiMuro 1 Link to comment Share on other sites More sharing options...
jchd Posted June 24, 2018 Share Posted June 24, 2018 Why not fixing your own shit by after reading the help file seriously? AutoBert 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 24, 2018 Moderators Share Posted June 24, 2018 @SomeoneFixThisShit so after creating a nasty thread it turns out to be your own lack of coding skill. Per your report we will not remove this thread but will lock it so that others can see 99.9% of the time it isn't the language's fault you aren't capable of figuring something out. If you approach future thread with the same attitude, be assured your time on this forum will be brief. FrancescoDiMuro 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts