b0x4it Posted July 10, 2011 Share Posted July 10, 2011 I put couple of URLs in the clipboard. I'd like to show a messagebox that has a line followed by a line break and then all the URLs tabbed. This is what I tried but it doesn't work (the tabbing part): $bak = ClipGet() MsgBox(0, "Dropbox URL generator", "URL(s) that have successfully been copied in clipboard:" & @CRLF & @Tab & $bak) the desired message box should looks like this: the appropriate explanatory line: http://www.autoitscript.com http://www.autoitscript.com http://www.autoitscript.com is there any easy way to do this or I have to manually add a tab at the beginning of all lines of the clipboad? Link to comment Share on other sites More sharing options...
taietel Posted July 10, 2011 Share Posted July 10, 2011 (edited) Try this: $bak = ClipGet() $bak = StringSplit($bak,@LF,2) $sText = "" For $i=0 To UBound($bak)-1 If $bak[$i]<>@CRLF Or $bak[$i]<>@CR Or $bak[$i]<>@LF Then $sText &= @TAB & $bak[$i]&@LF Next MsgBox(0, "Dropbox URL generator", "URL(s) that have successfully been copied in clipboard:" & @CRLF & $sText) [EDIT] Replaced @CRLF with @LF Edited July 10, 2011 by taietel Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
smartee Posted July 10, 2011 Share Posted July 10, 2011 hi, You can try something like:$sURLs = ",www.google.com,www.autoitscript.com,www.youtube.com" MsgBox(64, "Demo1", "The list of URLs you requested is below:" & StringReplace($sURLs, ",", @CRLF & @TAB)) Hope this helps -smartee Link to comment Share on other sites More sharing options...
b0x4it Posted July 11, 2011 Author Share Posted July 11, 2011 hi, You can try something like:$sURLs = ",www.google.com,www.autoitscript.com,www.youtube.com" MsgBox(64, "Demo1", "The list of URLs you requested is below:" & StringReplace($sURLs, ",", @CRLF & @TAB)) Hope this helps -smartee thanks for the reply, but urls are generated by totalcommander, so I can't make them in one line separated with "," Link to comment Share on other sites More sharing options...
b0x4it Posted July 11, 2011 Author Share Posted July 11, 2011 (edited) thank you for your replies, I found this very simple way to do this: $bak = ClipGet() MsgBox(64, "Demo1", "The list of URLs you requested is below:" & @CRLF & @TAB & StringReplace($bak, @LF, @TAB)) Edited July 11, 2011 by b0x4it 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