eddyd Posted March 26, 2009 Share Posted March 26, 2009 (edited) What i try to do is following 1.capture text from the active window. 2.This text is in columns. So I created variables for each column $col1 , $col2 3.Rearrange the text blocks in a new order . I created a variable $newview = $col3 & @tab & $col2... 4.copy this info to the clipboard so it can be pasted in an email. This works, however when you paste it, the view looks garbled exampledata1 result1 exampledatammm result2 exampledata123 result2 .... I've used $col1 = StringFormat("%-31.31s", $col1) to control the string width for each column So I assumed the output would form neat columns. The problem seems to be caused by the fonttype. Although each string from col1 is exactly 31 characters long, the field lenght is not equal if more 'wide' characters are in the string This causes the tab instruction to jump to the next tab. Is there a way to control this ? Edited March 26, 2009 by eddyd Link to comment Share on other sites More sharing options...
Marc Posted March 26, 2009 Share Posted March 26, 2009 The easiest way to avoid this effect is to use a fixed-space font like "Courier New", where an "i" is as wide as a "w". You could also try to put your data into a html table instead of plain text, some mail programs can interpret html in the mail code and display a table. Best regards, Marc Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL) Link to comment Share on other sites More sharing options...
eddyd Posted March 26, 2009 Author Share Posted March 26, 2009 The easiest way to avoid this effect is to use a fixed-space font like "Courier New", where an "i" is as wide as a "w".You could also try to put your data into a html table instead of plain text, some mail programs can interpret html in the mail code and display a table.Best regards,MarcI also thought of that, but how do I do that ? How do I define that $newview should use courier font ?rgds/eddy Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 26, 2009 Moderators Share Posted March 26, 2009 eddyd,The clipboard data takes on the default font of your e-mail program when it is "pasted in an email". So it is in your e-mail program that you need to set the mono-spaced font.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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