Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 61
  • Last Modified:

I need a vbscript that will take the info in the clipboard and format it then put it back into the clipboard

i need a vbscipt that will look at the below data in the clipboard

BBBBBBLINE1BBBBBBB
BBBBBBLINE2BBBBBBB
BBBBBBLINE3BBBBBBB
BBBBBBLINE4BBBBBBB

and put the 5 characters starting at character 8 and put it in the clipboard with vbcrlf after each line

result
LINE1 & VBCRLF
LINE2& VBCRLF
LINE3& VBCRLF
LINE3& VBCRLF
i cannot install any additional programs.
0
rjef
Asked:
rjef
  • 3
  • 2
1 Solution
 
oferamCommented:
Attached a script that does what you are after.

Notice that in your input example LINE1 starts at position 5 and not 8.
ClipboardExample.vbs
0
 
rjefAuthor Commented:
it didn't work
0
 
oferamCommented:
What happened?

what did you get? VBScript might not be allowed to run.

You can uncommnet the msgbox lines and see where you "get".
0
 
rjefAuthor Commented:
it worked if i say allow.  how do i turn that off?
1 then allow then 4 then 3 then 5
0
 
rjefAuthor Commented:
thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now