Solved

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

Posted on 2015-01-20
5
59 Views
Last Modified: 2015-03-25
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
Comment
Question by:rjef
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
oferam earned 500 total points
ID: 40559788
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
 

Author Comment

by:rjef
ID: 40559842
it didn't work
0
 
LVL 6

Expert Comment

by:oferam
ID: 40559855
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
 

Author Comment

by:rjef
ID: 40559867
it worked if i say allow.  how do i turn that off?
1 then allow then 4 then 3 then 5
0
 

Author Closing Comment

by:rjef
ID: 40687118
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question