| View previous topic :: View next topic |
| Author |
Message |
7usabball
Joined: 07 Jan 2009 Posts: 51
|
Posted: Sun Jul 26, 2009 4:27 am Post subject: How to copy without Ctrl+c |
|
|
I am doing just as my title says. I need to copy highlighted text without ctrl+c
the site I'm doing it on has blocked that
but u can actually right click and copy
so, how do I go about doing this?
as in, if I highlight something, it becomes copied to the clipboard without using ctrl+c
like:
clipboard = highlighted text |
|
| Back to top |
|
 |
amy Guest
|
Posted: Sun Jul 26, 2009 4:53 am Post subject: |
|
|
Try the other windows copy shortcut key: control+insert
| Code: | | ^w::SendInput ^{Insert} |
|
|
| Back to top |
|
 |
7usabball not logged in Guest
|
Posted: Sun Jul 26, 2009 5:25 am Post subject: |
|
|
| Thanks but control is blocked, so it wouldnt work |
|
| Back to top |
|
 |
amy Guest
|
Posted: Sun Jul 26, 2009 5:35 am Post subject: |
|
|
| 7usabball not logged in wrote: | | Thanks but control is blocked, so it wouldnt work | Well, if the selected text is in a "standard" windows edit control, you can try ControlGet, outvar, Selected,...
Otherwise you are SOL (unless you are into screen capture and character recognition). |
|
| Back to top |
|
 |
7usabball not logged in Guest
|
Posted: Sun Jul 26, 2009 5:58 am Post subject: |
|
|
Ill try controlget
And lol, i hope to make a text image recognition software some day in the future |
|
| Back to top |
|
 |
Carlol
Joined: 14 Aug 2006 Posts: 163 Location: CPH
|
Posted: Sun Jul 26, 2009 7:53 am Post subject: |
|
|
Try this:
| Code: | ;AUTOCOPY TO CLIPBOARD=============================================
~Lshift::
TimeButtonDown = %A_TickCount%
; Wait for it to be released
Loop
{
Sleep 10
GetKeyState, LshiftState, Lshift, P
if LshiftState = U ; Button has been released.
break
elapsed = %A_TickCount%
elapsed -= %TimeButtonDown%
if elapsed > 200 ; Button was held down long enough
{
x0 = A_CaretX
y0 = A_CaretY
Loop
{
Sleep 20 ; yield time to others
GetKeyState keystate, Lshift
IfEqual keystate, U, {
x = A_CaretX
y = A_CaretY
break
}
}
if (x-x0 > 5 or x-x0 < -5 or y-y0 > 5 or y-y0 < -5)
{ ; Caret has moved
clip0 := ClipBoardAll ; save old clipboard
;ClipBoard =
Send ^c ; selection -> clipboard
ClipWait 1, 1 ; restore clipboard if no data
}
return
}
}
~LButton::
MouseGetPos, xx
TimeButtonDown = %A_TickCount%
; Wait for it to be released
Loop
{
Sleep 10
GetKeyState, LButtonState, LButton, P
if LButtonState = U ; Button has been released.
{
If WinActive("Crimson Editor") and (xx < 25) ; Single Click in the Selection Area of CE
{
Send, ^c
return
}
break
}
elapsed = %A_TickCount%
elapsed -= %TimeButtonDown%
if elapsed > 200 ; Button was held down too long, so assume it's not a double-click.
{
MouseGetPos x0, y0 ; save start mouse position
Loop
{
Sleep 20 ; yield time to others
GetKeyState keystate, LButton
IfEqual keystate, U, {
MouseGetPos x, y ; position when button released
break
}
}
if (x-x0 > 5 or x-x0 < -5 or y-y0 > 5 or y-y0 < -5)
{ ; mouse has moved
;ClipBoard =
Send ^c ; selection -> clipboard
SoundPlay, C:\WINDOWS\Media\Windows XP Menu Command.wav
ClipWait 1, 1 ; restore clipboard if no data
}
return
}
}
Return
;-------------------------------------------------------------------------------- |
Thanks to the unknown and long forgotten author  |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Jul 26, 2009 5:51 pm Post subject: |
|
|
Thanks, but that wont work either because its still using ctrl+c
That seems very useful tho, but not now |
|
| Back to top |
|
 |
Hasso
Joined: 23 Mar 2005 Posts: 321 Location: Germany
|
Posted: Mon Jul 27, 2009 10:23 am Post subject: |
|
|
Use the AppsKey (context menu) | Code: | SetTitleMatchMode, 2
#IfWinActive, the uncopiable application ;put part of the name of that window here
^c::
clipboard=
send, {AppsKey}c
ClipWait, 2
MsgBox, %clipboard%
return
#IfWinActive
|
Tested. _________________ Hasso
Programmers don't die, they GOSUB without RETURN |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 627
|
Posted: Mon Jul 27, 2009 12:40 pm Post subject: |
|
|
| Carlol wrote: | Try this:
| Code: | ;AUTOCOPY TO CLIPBOARD=============================================
...
|
|
You could TRY FireFox + AutoCopy extension (doesnt use ctrl+c ??) |
|
| Back to top |
|
 |
koeselitz Guest
|
Posted: Mon Jul 27, 2009 4:16 pm Post subject: A simple way that should work. |
|
|
| You can do this easily (and in a single line) by sending {AppsKey}, which generally duplicates a Right Click. "Send,{AppsKey}c" works fine copying for me. |
|
| Back to top |
|
 |
Hasso
Joined: 23 Mar 2005 Posts: 321 Location: Germany
|
Posted: Mon Jul 27, 2009 5:24 pm Post subject: Re: A simple way that should work. |
|
|
| koeselitz wrote: | | You can do this easily (and in a single line) by sending {AppsKey}, which generally duplicates a Right Click. "Send,{AppsKey}c" works fine copying for me. |
... just what I said two posts above  _________________ Hasso
Programmers don't die, they GOSUB without RETURN |
|
| Back to top |
|
 |
|