Copy to clipboard without using ^c?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
milkygirl90
Posts: 565
Joined: 10 Nov 2020, 21:22

Copy to clipboard without using ^c?

31 Jul 2021, 23:10

I have a script that uses ^c to trigger some code. However, another piece of code requires me to copy text from the application. Is there any code I can use which can bypass ^c to copy the text?
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: Copy to clipboard without using ^c?

31 Jul 2021, 23:14

Code: Select all

var := "test"
clipboard := var
You could use things like ControlGetText and a lot of other ways to get text and put in clipboard
User avatar
boiler
Posts: 16925
Joined: 21 Dec 2014, 02:44

Re: Copy to clipboard without using ^c?

31 Jul 2021, 23:55

How about changing your script to use something other than ^c to trigger the code?
User avatar
milkygirl90
Posts: 565
Joined: 10 Nov 2020, 21:22

Re: Copy to clipboard without using ^c?

01 Aug 2021, 00:27

boiler wrote:
31 Jul 2021, 23:55
How about changing your script to use something other than ^c to trigger the code?
I want to retain that hotkey, hence asking for alternatives ..
User avatar
milkygirl90
Posts: 565
Joined: 10 Nov 2020, 21:22

Re: Copy to clipboard without using ^c?

01 Aug 2021, 00:28

AHKStudent wrote:
31 Jul 2021, 23:14

Code: Select all

var := "test"
clipboard := var
You could use things like ControlGetText and a lot of other ways to get text and put in clipboard
I have to first copy the text from application to clipboard first, hence can't assign it within ahk first.

Can't use control either cos there's no focused control:

https://i.imgur.com/IKX5M0t.png
User avatar
boiler
Posts: 16925
Joined: 21 Dec 2014, 02:44

Re: Copy to clipboard without using ^c?

01 Aug 2021, 01:34

If you can copy by right-clicking and selecting "Copy" from a context menu, then you can simulate that.
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: Copy to clipboard without using ^c?

01 Aug 2021, 02:43

milkygirl90 wrote:
01 Aug 2021, 00:28
AHKStudent wrote:
31 Jul 2021, 23:14

Code: Select all

var := "test"
clipboard := var
You could use things like ControlGetText and a lot of other ways to get text and put in clipboard
I have to first copy the text from application to clipboard first, hence can't assign it within ahk first.

Can't use control either cos there's no focused control:

https://i.imgur.com/IKX5M0t.png
Another option is ACC but do not know if it will work with this java based program.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], Mannaia666 and 410 guests