AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to copy without Ctrl+c

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
7usabball



Joined: 07 Jan 2009
Posts: 51

PostPosted: Sun Jul 26, 2009 4:27 am    Post subject: How to copy without Ctrl+c Reply with quote

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
View user's profile Send private message
amy
Guest





PostPosted: Sun Jul 26, 2009 4:53 am    Post subject: Reply with quote

Try the other windows copy shortcut key: control+insert
Code:
^w::SendInput ^{Insert}
Back to top
7usabball not logged in
Guest





PostPosted: Sun Jul 26, 2009 5:25 am    Post subject: Reply with quote

Thanks but control is blocked, so it wouldnt work
Back to top
amy
Guest





PostPosted: Sun Jul 26, 2009 5:35 am    Post subject: Reply with quote

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





PostPosted: Sun Jul 26, 2009 5:58 am    Post subject: Reply with quote

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

PostPosted: Sun Jul 26, 2009 7:53 am    Post subject: Reply with quote

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 Cool
Back to top
View user's profile Send private message
Guest






PostPosted: Sun Jul 26, 2009 5:51 pm    Post subject: Reply with quote

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

PostPosted: Mon Jul 27, 2009 10:23 am    Post subject: Reply with quote

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
View user's profile Send private message
a_h_k



Joined: 02 Feb 2008
Posts: 627

PostPosted: Mon Jul 27, 2009 12:40 pm    Post subject: Reply with quote

Carlol wrote:
Try this:
Code:
;AUTOCOPY TO CLIPBOARD=============================================
...


You could TRY FireFox + AutoCopy extension (doesnt use ctrl+c ??)
Back to top
View user's profile Send private message Visit poster's website
koeselitz
Guest





PostPosted: Mon Jul 27, 2009 4:16 pm    Post subject: A simple way that should work. Reply with quote

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

PostPosted: Mon Jul 27, 2009 5:24 pm    Post subject: Re: A simple way that should work. Reply with quote

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 Mr. Green Mr. Green
_________________
Hasso

Programmers don't die, they GOSUB without RETURN
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group