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
56 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
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)

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now