Jump to content
Macro Express Forums

Adding varied text into variables.


Recommended Posts

I get this data into clipboard


ID: 0555

Name: Steve
Job Title: Mop guy
Email: aol@aol.com
Phone: 973/555-5555
I would like to make each field into a variable.
example. data for ID = 0555 creating 0555 at T1 and so on with the rest.
Steve = T2
Mop guy = T3
aol@aol.com = T4

 

Link to comment
Share on other sites

I would set a variable to the contents of the clipboard then split it into an array Using CR LF. Then I would delete the appropriate number of characters in each to remove the labels.

Link to comment
Share on other sites

So, something like this:

Variable Set to ASCII Char 13 to %CR%
Variable Set to ASCII Char 10 to %LF%
Variable Set String %Clipboard% from the clipboard contents
Split String "%Clipboard%" on "%CR%%LF%" into %Record%, starting at 1
// Here:
  %Record[1]% holds the first line, "ID: 0555"
  %Record[2]% holds the second line, "Name: Steve"
  %Record[3]% holds "Job Title: Mop guy"
  etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...