topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • October 23, 2019, 04:48 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Select Copy - Auto-copy selected text  (Read 14514 times)

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 701
    • View Profile
    • The Blind House
    • Donate to Member
Select Copy - Auto-copy selected text
« on: September 26, 2014, 11:21 AM »
This is a work in progress but I wanted to get some feedback.

Select Copy is a small program that will auto-copy selected text to your Windows clipboard without having to press the Ctrl+C key. You can also paste from the clipboard using your middle mouse button if you have one. Read the readme.txt file for more information.

Give it a try and let me know what you think. As I said it is a work in progress and there will be bugs.

http://cgs.vdsworld.com/click.php?id=68
« Last Edit: September 28, 2014, 10:50 AM by c.gingerich »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,592
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #1 on: September 26, 2014, 12:53 PM »
I'm trying it out now.  It seems like the idea is to select with mouse dragging left to right?  Because if I go right to left I don't get the tooltip saying "copied."

Also middle click paste it is hard to tell if SelectCopy misses it because so many other programs hook it.  I closed my catch all AHK script to avoid hotkey conflicts but many editors use middle mouse for auto scroll etc..

Also it might be a cool idea to keep a buffer of clipboard text so that one undo is possible.  Like I have something in clipboard and forget to hold the shift key while doing a "search google for..." etc..

I like the concept if it can be used smoothly.

What I noticed on middle mouse button.. I would click in an editor with no paste.  Repeating the click once or twice it would usually start pasting.

Edit:  I'm on Windows 8.0 x64 and use Firefox based browsers.  Editor tests were EditPad Lite 7 and notepad.


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,592
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #2 on: September 26, 2014, 01:11 PM »
For what it's worth I did a similar thing limited to certain browsers.  After dragging the mouse to select I kept the mouse button down,then pressed and released the shift key.  If copy succeeded it sounded a tone.  It's less versatile but also has fewer conflicts.  :)

Edit:  If you can get it to work in most everything I'd love to use it.  I can always comment out my mouse drag function.   :Thmbsup:

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 701
    • View Profile
    • The Blind House
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #3 on: September 26, 2014, 01:27 PM »
Thanks for the feedback. I didn't put too much into it yet, just mainly wanted it for myself :-) It should work no matter which way you select.

I'll look into seeing if I can add a buffer for an undo and I'll look into the middle button paste issue. I did notice that on my system also sometimes, not sure what is causing that.

Thanks again!

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 701
    • View Profile
    • The Blind House
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #4 on: September 26, 2014, 02:47 PM »
Here is an update - Tried to fix the middle button paste and select issue. Please let me know.

http://cgs.vdsworld.com/click.php?id=68

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,592
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #5 on: September 26, 2014, 05:12 PM »
It seems even less likely to copy now.  I didn't get it to paste with mouse at all.  One time it did paste with shift-insert.  But the first version seemed a lot more solid on the copy.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 701
    • View Profile
    • The Blind House
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #6 on: September 26, 2014, 07:53 PM »
There is a 0.3 delay for the copy to make sure there a drag happening. Please try again and hold the left mouse key a bit longer before letting go to see if it works then. If that is the case I will have to either adjust the delay or change the code as to not include a delay.

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,451
  • Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #7 on: September 26, 2014, 09:31 PM »
Not sure whether this might help, but there is an auto-copy extension for Firefox here: http://autocopy.mozdev.org/

I have used it for ages. It works a treat capturing with a touchpad giving left-to-right or right-to-left select, or double-tap on a word.
I'm not suggesting that you could use it for what you are proposing here, but it could give you some ideas and save some reinvention of the wheel.
From memory there was also a Greasemonkey script that did something similar.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,592
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #8 on: September 27, 2014, 05:58 AM »
But if I get the tooltip it should indicate it copied.  Maybe my system isn't the best test bed since I have many hotkey things running.  Just for grins I snipped a section of my code that does copy when mouse button and shift are down.  It works fine in browsers.  But when I removed the #IfWinActive that limits it to browsers it didn't work well either.  (Your code was not running when I tried it.)

If response is snappy on your system then there's probably something weird going with mine.   :o

Edit:  That may be why when I was messing with my own I limited it to FF chrome and Opera in the first place.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 701
    • View Profile
    • The Blind House
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #9 on: September 28, 2014, 10:24 AM »
I think it may be your system  :( I have tested it on 2 other systems and it has been working as expected.

Can anyone else test and let me know of any problems?

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 701
    • View Profile
    • The Blind House
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #10 on: September 28, 2014, 10:27 AM »
If testing outside of the US, I think you'll have a problem in this version. It may crash, but I am working on an update though. :-)

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 701
    • View Profile
    • The Blind House
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #11 on: September 28, 2014, 10:52 AM »
Update: 1.0.0.4 -

- Added Restore Previous Clip function in case something was copied that you didn't want. :-) Thanks Miles for the idea.
- Fixed bug that could cause a crash if running outside of the US.

http://cgs.vdsworld.com/click.php?id=68

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 701
    • View Profile
    • The Blind House
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #12 on: October 02, 2014, 11:49 AM »
I haven't forgot about this. Turns out that Skrommel wrote something like this. I took some hints from that and I am adding them to mine as well as a buffer to restore previous clips and to only copy when the I-Beam cursor is showing as to only copy text.

Twinbee

  • Member
  • Joined in 2012
  • **
  • Posts: 73
    • View Profile
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #13 on: June 15, 2015, 05:01 PM »
I think I might find this useful. I often dislike having to Ctrl+C before I can Ctrl+V.

One thing you might have some info on though, Chrome complains when I try to download it: "select_copy.zip is malicious, and Chrome has blocked it.".

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,592
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #14 on: June 16, 2015, 06:52 AM »
I think I might find this useful. I often dislike having to Ctrl+C before I can Ctrl+V.

One thing you might have some info on though, Chrome complains when I try to download it: "select_copy.zip is malicious, and Chrome has blocked it.".

I don't put much stock in chrome download.  When I download from my page it suggests discarding the download because "not a lot of people are downloading it."  So if you are not on Snapfiles with thousands of downloads your code must be the work of the devil.   :down:

Twinbee

  • Member
  • Joined in 2012
  • **
  • Posts: 73
    • View Profile
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #15 on: June 16, 2015, 01:19 PM »
Yeah, I expect a warning for the type of functionality this sort of program offers. But it's bad of Chrome to block it outright (and not even use the word 'possibly' as a prefix for malicious) without me being able to override its block. Maybe there's a way to make it 'appear' more safe to paranoid browsers like Chrome.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,592
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #16 on: June 16, 2015, 01:30 PM »
Yeah, I expect a warning for the type of functionality this sort of program offers. But it's bad of Chrome to block it outright (and not even use the word 'possibly' as a prefix for malicious) without me being able to override its block. Maybe there's a way to make it 'appear' more safe to paranoid browsers like Chrome.

It is weird how they look at things.  I had an issue with a few of my downloads.  It seems that on VirusTotal a couple of my zip files were flagged by 2 av out of 57.  So that is bad.  Instead of looking at it like "your software was found safe by 55 av out of 57."

btw just for grins I uploaded WildGem.exe to VirusTotal.  It got 56 green checks out of 57.  :)

Twinbee

  • Member
  • Joined in 2012
  • **
  • Posts: 73
    • View Profile
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #17 on: June 16, 2015, 06:58 PM »
Haha, I wonder what could possibly have triggered that. It doesn't even save a preference file, let alone touch the registry or anything.

There's an embedded ScintillaNET DLL in the main exe - maybe that hit a raw nerve in it :)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,592
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Select Copy - Auto-copy selected text
« Reply #18 on: June 17, 2015, 05:49 AM »
Haha, I wonder what could possibly have triggered that. It doesn't even save a preference file, let alone touch the registry or anything.

There's an embedded ScintillaNET DLL in the main exe - maybe that hit a raw nerve in it :)

My ahk and autoit compiles have the interpreter embedded.  I'm sure that is what trigger many of them.  Especially ClamWin doesn't seem to like my scripts.  If anyone questions it I usually send a screen shot of a clean report by MBAM on the whole folder of my uploads.