RaulB Posted January 2, 2019 Report Share Posted January 2, 2019 I am trying to open my different accounts and I have them in order of website link, Login, and Password. I want to create a macro to open all the Links and insert password and emails. However it takes so long to go to each cell to copy that I want to copy the full column and split by new line. Is this possible and if not whats a proficient way to go about this? Quote Link to comment Share on other sites More sharing options...
acantor Posted January 2, 2019 Report Share Posted January 2, 2019 From your description, it sounds like you are using Excel (or some other spreadsheet)to store account information in columns, e.g., AccountName Login Password AccountName Login Password AccountName Login Password etc. Is this correct? Quote Link to comment Share on other sites More sharing options...
rberq Posted January 2, 2019 Report Share Posted January 2, 2019 I have these lines in a macro that uses a few special characters. See the setting of variable T92 to the New Line value. Once you have set the value, I think you could split using %T92%. // // Tab character ascii 9 Variable Set %T91% to ASCII Char of 9 // // Line Feed (New Line) character ascii 10 Variable Set %T92% to ASCII Char of 10 // // Carriage Return character ascii 13 Variable Set %T93% to ASCII Char of 13 // // Carriage Return / Line Feed combination characters ascii 13 + ascii 10 Variable Set %T94% to ASCII Char of 13 Variable Modify String: Append %T92% to %T94% // Quote Link to comment Share on other sites More sharing options...
RaulB Posted January 2, 2019 Author Report Share Posted January 2, 2019 I have it as: Link Login Password Link Login Password Link Login Password Link Login Password Link Login Password it is in a macro and want to copy column and separate each Login and Passwords. Rberq how would I be able to apply that into the Macro? Quote Link to comment Share on other sites More sharing options...
acantor Posted January 2, 2019 Report Share Posted January 2, 2019 Just for fun, I wrote this, which assumes the three values appear in one cell separated by a space. Clipboard Copy Variable Set String %Clip% from the clipboard contents Split String "%Clip%" on " " into %Results%, starting at 1 Text Box Display: <CLIPBOARD COPY/> <VARIABLE SET STRING Option="\x02" Destination="%Clip%" NoEmbeddedVars="FALSE"/> <SPLIT STRING Source="%Clip%" SplitChar=" " Dest="%Results%" Index="1"/> <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %Results[1]%\r\n\\par %Results[2]%\r\n\\par %Results[3]%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> Quote Link to comment Share on other sites More sharing options...
rberq Posted January 2, 2019 Report Share Posted January 2, 2019 In Excel, I assume each "Link Login Password" is a single row. But is it one column with spaces between the items, or is it three columns? (I'm asking pretty much the same question that acantor asked, above.) It will make a difference as to the easiest way to isolate the individual items. Quote Link to comment Share on other sites More sharing options...
RaulB Posted January 2, 2019 Author Report Share Posted January 2, 2019 they are three separate columns, and the Link, Login, Password are in the same row but in separate cells. thank you for any help you can provide. Quote Link to comment Share on other sites More sharing options...
RaulB Posted January 2, 2019 Author Report Share Posted January 2, 2019 thank you, "Variable Set to ASCII Char 10 to %T92%" and then split string by %T92%, worked to separate the copied string by the new line. Quote Link to comment Share on other sites More sharing options...
Cory Posted January 2, 2019 Report Share Posted January 2, 2019 I don't like T variables. You're using MEP then you should use named variables. Like this. I typically remove all occurrences of one of the, sat the CarrigeReturn then I split on LineFeed. Then each row with tabs. Assuming the cells you're speaking of are in Excel. Quote Link to comment Share on other sites More sharing options...
rberq Posted January 2, 2019 Report Share Posted January 2, 2019 1 hour ago, RaulB said: thank you, "Variable Set to ASCII Char 10 to %T92%" and then split string by %T92%, worked to separate the copied string by the new line. Then if you have split out the lines, next step is to split out link/login/password. My guess is, the Tab character is inserted by Excel between the items, so that can be used for splitting. Tab character in my example code was placed into variable %T91%. Cory is right, it's sometimes easier to use variables with meaningful names, but I use Macro Express Version 3 that only allows T for text variables, N for integers, and D for decimal. Quote Link to comment Share on other sites More sharing options...
MrStacyMartin Posted August 10, 2019 Report Share Posted August 10, 2019 (edited) I'm not sure this approach works if the cell contains an embedded NL? Ex: This line is all in a single excel cell using ALT-ENTER to enter in a CR Edited August 10, 2019 by MrStacyMartin Corrected to ALT-ENTER Quote Link to comment Share on other sites More sharing options...
amonaghan Posted August 10, 2019 Report Share Posted August 10, 2019 Are you sure you don't mean Alt-Enter? 1 Quote Link to comment Share on other sites More sharing options...
MrStacyMartin Posted August 10, 2019 Report Share Posted August 10, 2019 correct... ALT-ENTER. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.