Copy selected area Paste

TOUILLE -  
yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   -
Hello,

I would like to develop a "button" (.bat) that allows me to copy the text I've selected on any type of platform (internet, Word, Excel,...) and another one to paste it at the selected location.

Can you please help me?

Thank you in advance!

1 answer

  1. TOUILLE
     
    I up
    0
    1. brucine Posted messages 25100 Registration date   Status Member Last intervention   4 172
       
      Hello,

      Even at the time when I was paying (a lot) for the customer service of a professional software, it filtered the urgency of requests and did not process minor ones within 2 hours.

      That said, for you to get a response, one would first need to understand.

      A bat is not a button but a command file.

      And even if it were possible on a variety of sources, I don’t see what we would gain compared to using the mouse or the CTRL + C and CTRL + V shortcuts.
      0
    2. TOUILLE > brucine Posted messages 25100 Registration date   Status Member Last intervention  
       
      Hello Brucine,

      Thank you for your response.
      In fact, I suffer from carpal tunnel syndrome due to the repetitive CTRL C and V that my work imposes on me. Working in administration, our PCs are terribly locked down, and I can't manage my keyboard shortcuts, and some of our software doesn't offer the right-click copy feature.

      The different departments keep passing the buck and are not offering me a real solution (an ergonomic mouse with non-configurable shortcuts... so just a regular mouse...).

      I have searched around and found some VBA codes, but they only apply to Excel.

      I'm therefore looking for a way, a command that would allow me to copy the selected text area and another one that would allow me to paste into the area where my cursor is located.

      I don't know if that's possible or not...

      If it isn't, I'm sorry to waste your time.
      0
    3. brucine Posted messages 25100 Registration date   Status Member Last intervention   4 172 > TOUILLE
       
      You will have to select your area to copy: from there, a right-click is needed to copy it to the clipboard and another to paste it.
      We can create a batch that will copy the content of the clipboard wherever we want, but it is useless in this case since we will have to copy to the clipboard anyway.

      The only alternative approach must be to record the keyboard action with a macro recorder.
      I haven't used this kind of thing in ages.
      Windows 10 has by default in Programs-Accessories a user action recorder whose capabilities I don't know.
      Using a macro in Word or Excel won't help much: it "mimics" a specific input, not a variable area.
      So we probably need to look towards a keyboard input recorder, but I don't understand anything about it:
      https://www.thefreewindows.com/1876/use-keyboard-macros-in-batch-files-with-sendkeynet/
      (more links below).
      In the same "I don't understand anything" section, it is likely that an AutoHotKey macro does the job:
      https://www.autohotkey.com/

      At the command line, we should be able to paste the clipboard by mimicking Alt+Space, E, P:

      Send !{Space}ep

      https://www.howtogeek.com/howto/25590/how-to-enable-ctrlv-for-pasting-in-the-windows-command-prompt/

      And there are many other programs available.
      0
    4. yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   1 588 > TOUILLE
       
      You didn't specify how you would like to trigger these actions "copy" and "paste"
      Have you considered using the sticky keys feature of Windows?
      0
    5. yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   1 588 > TOUILLE
       
      Isn't it easiest to use a programmable mouse?
      0