AutoHotkey Community

It is currently May 27th, 2012, 10:59 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: February 8th, 2007, 2:20 pm 
Hy

At work, we have a program that does not allow us to use ^c to copy text to the clipboard. We always have to select the text, rightclick it and select 'copy'; same goes for paste. Whisch is very anoying since we have to copy text around all the time :(
Now I'm hoping that I could write a little program with AHK to reenable ^c... I thought of something like

^c::
;store selected text in specified variable

^v::
SendInput %SpecifiedVariable%

So is there a way to get this done without using something like 'send ^c'? Which is the answer I saw in the other posts and which sure works in most cases, but probably not in this one...

Thanks for your help
Martin


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 8th, 2007, 2:26 pm 
Code:
!c::Send, {AppsKey}c ; press ALT+c
!v::Send, {AppsKey}p ; press ALT+v
A workaround 8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 8th, 2007, 4:57 pm 
Again, I don't think this would work... It's not that the Ctrl-key doesn't work, but that Ctrl+c doesn't have the normal function. So sending Ctrl+c by AHK would do the same thing as pressing Ctrl+c on the keyboard, nothing :(
Is there really no other way to get information about selected text?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 8th, 2007, 5:08 pm 
Don't get me wrong, my scriptlet states that you've to use ALT+c to copy, so there's no CTRL blabla involved. And it exactly mimiks the way you're forced to go, means to use the context menu and its copy command. So it should work anyway. Beside that I've offered it as a workaround, not as the one and only final solution. Currently I've the idea that you haven't tested it at all ... :?

Quote:
Again, I don't think this would work
Rethink!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 8th, 2007, 5:13 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
Note: AppsKey open the context menu (right-clickmenu)!
EDIT: Supporting BoBo's workaround...

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 8th, 2007, 5:33 pm 
Sorry, you're right, I couldn't test it, since I want to present a fixed solution. But I didn't take enough time to study your post and look up, what the AppsKey means... I'm really sorry :(

So I'm going to try it like that, and Thx for the workaround :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 8th, 2007, 6:04 pm 
I'm surprised, the context menu box pops up/down so fast (just a quick flash), it's hard to realize at all (might be different at your system). 8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 8th, 2007, 11:26 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
There's also Ctrl-Insert which is synonymous with Ctrl-C, as well as Shift-Insert and Shift-Delete for Ctrl-V and Ctrl-X respectively.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 8th, 2007, 11:40 pm 
Quote:
There's also Ctrl-Insert which is synonymous with Ctrl-C, as well as Shift-Insert and Shift-Delete for Ctrl-V and Ctrl-X respectively.
Cool. Never heard about that! Thx mate. 8)

So Tyltus doesn't need a workaround at all. Issue solved. :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2007, 11:18 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
BoBo wrote:
Cool. Never heard about that!
That's the Windows 3.1 (IIRC) shortcuts or they are even dating back to Dos-times...
Ctrl+C/X/V are copied from Macintosh (AppleKey+C/X/V).
They are easier to remember (C as copy, of course, X as scissors, V as the tip of a glue tube...), are nicely grouped and close of the control key, so are easy to reach and type.
I am not sure, but I believe the old shortcut keys must be handled explicitly by the program, otherwise they are not supported."

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 6th, 2007, 5:18 pm 
Offline

Joined: April 6th, 2007, 5:16 pm
Posts: 12
Those alternate copy/paste functions date back to DOS days. If you open the old DOS Edit program, you'll see them there.

And any app that supports Copy/Paste will support the alternate methods. I use them frequently, because I mouse left-handed. So my left hand can stay on the mouse, and my right handles the copy/paste stuff.

However, usually if a screen disables the actual CTRL+C, it doesn't handle the alternates either.

_________________
~ Eric D. Burdo


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Edd, Exabot [Bot], HotkeyStick, Yahoo [Bot] and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group