Avatar of bfuchs
bfuchs
Flag for United States of America asked on

Software for copy and paste text with advanced features.

Hi Experts,


I need a way to copy and paste from one place to another to work as follows.


1- should copy entire selected section at once and when it comes to paste it should give me each line separately, as if I would have copied each line separately and when it comes to paste (by using winkey+v) should be each line as separate item.


2 - after pasting each item thru winkey+v, that item should be removed from list or be moved to the end of the list, so for example when copying 10 items, the 1st item should show up first, after selecting that then the 2nd item should show up 1st in order and so forth.


Thanks


SoftwareSystem UtilitiesWindows 10System Programming

Avatar of undefined
Last Comment
Joe Winograd

8/22/2022 - Mon
arnold

You should open a seperate question for each section you want to clarify as a followup to your original question.
This is not a way to do it.
bfuchs

ASKER
@arnold,
I have modified my question accordingly...
Thanks
serialband

How about setting the default pdf viewer to IE, then in IE set a default download location and setting the action for downloaded pdf?

https://social.technet.microsoft.com/Forums/ie/en-US/11e1ed75-6b4b-4f9e-a47e-7e11686f6329/internet-explorer-downloadingsaving-pdf-rather-than-opening
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
arnold

Much depends on what it is you are copying, and what it is you are trying to accomplish.

If you are doing this manually, you would need to do it yourself, winkey+v select, winkey+V option (right top .), delete.

Unfortunately, you removed the reference to the prior question that this one follows up on.

It seems windows 11 has a further enhanced clipboard...

Is the option available for automation/scripting or is it a manual thing you have to do?
Joe Winograd

Hi serialband,

I think you meant to post that to a different question:
https://www.experts-exchange.com/questions/29230462/Make-IE-open-PDFs-without-changing-default-app.html

Regards, Joe
Joe Winograd

Hi Ben,

> should copy entire selected section at once
> give me each line separately

Does the selected section already have new-line characters (CR/LF - carriage return/line feed) between each line? If not, how would the enhanced Copy/Paste function that you're looking for know where to break up the selected section into separate lines?

Regards, Joe
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
bfuchs

ASKER

Hi Experts,
Is the option available for automation/scripting or is it a manual thing you have to do?
Its manual task.

Does the selected section already have new-line characters (CR/LF - carriage return/line feed) between each line?
Yes it has, see example attached.
Untitled.png

Thanks


arnold

You can not see things in an image.
what I see is you have a table, the text within the cell is wrapping not a reflection of having a carrieage return/line feed.

Your question deals with a specific task you've already decided on that you are trying to improve, Joe I think has the autokey reference that might help, but you would have to do things in the correct, pre-planned sequence.

What is the one place from which you are copying and what is this second place to which you are copying?

Is it possible to make this an electronic data collection interface?
Joe Winograd

Hi Ben,

It is easy to write a program that does what you want. I see the specs as something like this:

• Provide a hotkey to copy all selected text. I suggest something other than Ctrl+C (such as Alt+Ctrl+C) so as not to interfere with the "real" Ctrl+C.

• Provide a hotkey to paste the next line in the previously selected text. I suggest something other than Ctrl+V or Win+V (such as Alt+Ctrl+V) so as not to interfere with the "real" Ctrl+V and Win+V.

• After pasting a line from the previously selected text, delete that line from the previously selected text.

• Place an icon in the system tray (notification area). I'm thinking of an icon that looks like a clipboard, maybe this (which is in the built-in shell32.dll, so an external file is not needed):

clipboard from shell32-48x48
• A right-click on the icon brings up a context menu with the following choices:

View Selected Text - views the currently selected (remaining) lines in the app that owns the TXT file type on your system, such as Notepad

Delete Selected Text - deletes all the lines in the currently selected text, i.e., an easy way to start over when you decide that you don't want to paste any more of the selected lines

Exit - quits the program, thereby deleting any (remaining) selected lines and disabling/removing the Copy and Paste hotkeys.

Let me know if you want any other features in the program. Regards, Joe
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Joe Winograd

Hi Ben,

I haven't heard back from you on my previous post, but decided to move forward with the program. I wrote it in the AutoHotkey language. I know that you're an AutoHotkey user from our previous threads here at EE, but if you need a refresher on it, have a look at my EE article:
AutoHotkey - Getting Started

Attached is a short demo (3:25) of the program in its current state. I'm not posting the AHK script here yet, as there are a few things I want to change, and if you have any other requirements, I'll make the enhancements for you before posting. Please let me know if the attached video hits the mark for you. If not, where does it miss? Regards, Joe
benclip-demo.mp4
bfuchs

ASKER
Hi,

What is the one place from which you are copying and what is this second place to which you are copying?
I am copying from word documents and need them in HHAExchange where I'm tasked of creating for each entry a separate field.
I have posted a pic here, so you can have an idea what am talking about...

@Joe,
Sorry for the delays in response, just want make sure.
1- before we write a program for it that there isn't something avail yet.
2- It will be a simple program and not involve a lot of time, as at the moment I'm not sure how many of such tasks are still needed, (I had to do dozens in the beginning but by now I may be at the end...)

Thanks

Joe Winograd

> before we write a program for it

Too late...already wrote it. :) See video demo attached to my previous post.

> that there isn't something avail yet

There are plenty of clipboard managers available with tons of features, but the (simple!) one that I wrote for you is specific to your requirements.

> a simple program and not involve a lot of time

Correct on both counts.

Regards, Joe
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
bfuchs

ASKER
Hi Joe,
 Please let me know if the attached video hits the mark for you. If not, where does it miss?
Sorry I didnt realized it was on the works already...
Great, It seems like doing exactly what I was looking for..
Perhaps one small thing could be added, when right click instead of just pasting the 1st item of the clipboard, it should show all items currently on the clipboard the way winkey+v does, except for the items already pasted.

Thanks
Joe Winograd

> when right click

To be clear, it's not a right click. It's a hotkey, such as Alt+Ctrl+C.

> instead of just pasting the 1st item of the clipboard, it should show all items currently on the clipboard

If it shows all items currently on the clipboard, do you still want it to paste (and then delete) the first item always? Or do you want to be able to select which one it pastes (and then deletes)?
bfuchs

ASKER
Hi,
To be clear, it's not a right click. It's a hotkey, such as Alt+Ctrl+C.
I have seen in your recording right click and that's why I thought it will be...anyway a combination of keys is fine, however would prefer combination of 2 keys (not 3) if possible...

If it shows all items currently on the clipboard, do you still want it to paste (and then delete) the first item always?
Yes, as mostly I will be pasting the 1st item on the list, the rest of the list is useful in order to know when I'm up to...

Thanks
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
bfuchs

ASKER
Hi Joe,
for when can I expect the script?
Joe Winograd

> I have seen in your recording right click and that's why I thought it will be

I suggest that you view the video again, more carefully this time. The right-click is only on the system tray icon and has nothing to do with the copy/paste operations. It is there simply for three admin tasks (View Selected Text, Delete Selected Text, Exit), as shown in the video and documented in one of my previous posts. The copy/paste operations are via a hotkey for each, not a right-click, as shown beginning at 1:45 into the video.

> would prefer combination of 2 keys (not 3) if possible

As mentioned in one of my previous posts, I suggest something other than Ctrl+C, Ctrl+V, and Win+V so as not to interfere with the standard handling of those keys. I can make it whatever 2-key combo that you want, but, again, I suggest avoiding common key combos. One idea is a combo with the function keys, maybe Ctrl+F11 for Copy and Ctrl+F12 for Paste; or Ctrl+F12 for Copy and Alt+F12 for Paste. Let me know what you prefer...it is very easy to change.

> Yes, as mostly I will be pasting the 1st item on the list, the rest of the list is useful in order to know when I'm up to

OK. I'm thinking that after each Paste, I can automatically run the View Selected Text code, just as if you had picked it manually from the right-click context menu.

> when can I expect the script?

My goal is today, but it could be tomorrow or the next day. Depends on issues with paying customers. :)
arnold

Joe, here is a  question on whether it is doable, i.e. the user specifies the destination file.
then the copy automatically writes out or pastes the data into the destination in the order it is copied.
Can autohotkey have a destination preset into which it will paste what is copied?
Or does this require the select active window.... type of handling?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
bfuchs

ASKER
Hi,

 I can make it whatever 2-key combo that you want, but, again, I suggest avoiding common key combos ...
In that case I would prefer Shift+s for copy and Shift+d for paste as the other handy controls of the left side are mostly taken (Ctrl,Winkey,Alt) and the function keys are not handy.

One more thing regarding copying if not that difficult, if it is then will leave that for a later time.
Most of the times I do want things to be considered separate items even if they are on same line.
So  perhaps logic should be, either any special character should be an item separator or always when there are more than just a single space between words, it should be considered as separate items.

For example the below.
  1. Are you involved in making decisions about your Plan of Care?
¨ Always                   ¨ Sometimes
¨ Usually                   ¨ Never
Comment: _______________________________________________________________________________

So in the given case, I end up with 6 items in the order below.
  • Are you involved in making decisions about your Plan of Care?
Always                  
Sometimes
 Usually                  
Never
Comment

Thanks

Joe Winograd

Hi Arnold,

> the user specifies the destination file. then the copy automatically writes out or pastes the data into the destination in the order it is copied

Easy. But keep in mind that Ben wants control on when each item (line) is pasted.

> Can autohotkey have a destination preset into which it will paste what is copied?

Yes.

> Or does this require the select active window

No, it does not have to be the active window.

Regards, Joe
Joe Winograd

> In that case I would prefer Shift+s for copy and Shift+d for paste as the other handy controls of the left side are mostly taken (Ctrl,Winkey,Alt) and the function keys are not handy.

Well, you really don't want Shift+s or Shift+d as the hotkeys, as they are the upper case letters for S and D. On most keyboards, Ctrl, Win, and Alt are together on the left side, like this:

ctrl win alt keys left side
It is easy to use two fingers on your left hand to press Ctrl and Alt, or Ctrl and Win, or Win and Alt at the same time, and then tap a letter with your right hand. That's my suggestion (if your function keys are not handy).

> Most of the times I do want things to be considered separate items even if they are on same line.

In those cases, use the View Selected Text feature, which loads the copied text into Notepad, then use the Enter key to break the line(s) wherever you want, then re-copy all the lines from Notepad to the clipboard.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
bfuchs

ASKER
Well, you really don't want Shift+s or Shift+d as the hotkeys, as they are the upper case letters for S and D.
I am assuming that you first must activate the script in order to have it functioning, therefore I dont see a problem with having Shift+s be the copy, as at the time I am working on the copy/paste task there are no typing, however you can do the 3 key combination and will work with that.
In those cases, use the View Selected Text feature, which loads the copied text into Notepad, then use the Enter key to break the line(s) wherever you want, then re-copy all the lines from Notepad to the clipboard.
Okay will do that.
Ben wants control on when each item (line) is pasted.
Correct, wish I could use automation but not possible as each field needs to be defined separately and something must be clicked between those, besides some are values not fields, as you can see on the example above...

Thanks
arnold

you activate the app, but at the same time word is also monitoring keystrokes.
it is not as though autohotkey is active and prevents the active application from getting keystrokes.
arnold

can whatever you are dealing with be marked up to designate sectoin that then can be run through extracting the data between marks?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Joe Winograd

> I am assuming that you first must activate the script in order to have it functioning

Yes, of course, you must run the script.

> therefore I dont see a problem with having Shift+s be the copy

OK, as long as you terminate the script after the copy/paste task so that you reclaim the use of Shift+s and Shift+d.
Joe Winograd

Hi Ben,
Attached is a short video (3:58) showing where things stand now. Regards, Joe
benclip-v2.mp4
bfuchs

ASKER
Looks fine Joe,
Thanks
Your help has saved me hundreds of hours of internet surfing.
fblack61
bfuchs

ASKER
In those cases, use the View Selected Text feature, which loads the copied text into Notepad, then use the Enter key to break the line(s) wherever you want, then re-copy all the lines from Notepad to the clipboard.
I think to first copy the whole text into notepad, there adjust all line breaks, then activate the script to do the pasting, no?
Joe Winograd

> Looks fine Joe, Thanks

OK

> I think to first copy the whole text into notepad

Yes

> there adjust all line breaks

Yes

> then activate the script to do the pasting

Yes
ASKER CERTIFIED SOLUTION
Joe Winograd

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
bfuchs

ASKER
Hi Joe,

Looks like, I'm not using it correctly, as the results was like in first attachment.
Untitled.png
Just to clarify, what I really need is after copying, to be able to paste them one after the other in given place, and it should work exactly the way it used to work with winkey+v, see second attachment.
Untitled1.png

p.s. if viewing all remaining items on clipboard makes it complicate, we can leave it for later, most important is the copy/paste should work in the most convenient/practical way.

Thanks
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Joe Winograd

> Looks like, I'm not using it correctly,

Here are the steps:

(1) Run the script (this does nothing except put the icon in the system tray and enable the two hotkeys)

(2) Select/highlight text somewhere...in some program...I don't know where you're getting the text from, but I thought it was Word (because of that screenshot you posted with the table in Word)

(3) Hit Shift+s

(4) Go to the program where you want to paste one line at a time and hit Shift+d each time you want the next line (I'm not sure where that is but I think it's a browser)

(5) Terminate the script by right-clicking the system tray icon and selecting Exit (this removes the icon from the tray and disables the two hotkeys so that you can use Shift+s and Shift+d normally again)
bfuchs

ASKER
to work perfectly fine.
Thank you Joe!
bfuchs

ASKER
Hi,
Just had an instance where one shift+d didnt paste and the next shift+d pasted 2 items at once, both at the same line.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Joe Winograd

Can you reproduce that problem? If so, send me the text that causes it and I'll troubleshoot it here.
bfuchs

ASKER
Hi,
looks like the word doc I was using didn't have the new character field, just spaces that pushed the text to the next line, so your code is working as expected.
Thanks
Joe Winograd

Great, thanks for letting me know.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.