Can AHK do this?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
bugzy
Posts: 9
Joined: 16 Oct 2018, 14:50

Can AHK do this?

16 Oct 2018, 14:59

I'm finding ways to have an alternatives on windows shortcuts

control + c (copy)
control + v (paste)
control + a (select all)

and I came across this AHK.

My job is heavy on copying and pasting. I'm copying text from a specific text on a website, urls on chrome's url bar and specific text on Microsoft word to Google online spreadsheet.

Before I download AHK, can AHK do the job for me like hitting only "c" "v" and "a" w/out the control button?

Thanks
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Can AHK do this?

16 Oct 2018, 15:43

Yes!

Code: Select all

#SingleInstance, Force

; Control + C (Copy)
; Control + V (Paste)
; Control + A (Select All)

c::
	Send, ^c
return

v::
	Send, ^v
return

a::
	Send, ^a
return
bugzy
Posts: 9
Joined: 16 Oct 2018, 14:50

Re: Can AHK do this?

16 Oct 2018, 16:01

@Dewd

wow it's working. Problem now is I can't use c v a when typing. Is there a shortcut to temporarily disable the script so I don't need to diable it manually on the task bar?

also instead of c v a can use the arrows instead? what would be the key for the arrows?
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Can AHK do this?

16 Oct 2018, 16:10

Press F12 to toggle on/off. Use arrow keys Down, Left, and Right to perform copy/paste/select all functions.

Code: Select all

#SingleInstance, Force

Toggle := 0 ; Initialize variable with starting value of zero

F12::
	Toggle := !Toggle ; If Toggle equals 1, change to zero. If Toggle equals zero, change to 1.
return

#If (Toggle = 1)
	Down:: ; Copy
		Send, ^c
	return

	Left:: ; Select All
		Send, ^a
	return

	Right:: ; Paste
		Send, ^v
	return
#If
bugzy
Posts: 9
Joined: 16 Oct 2018, 14:50

Re: Can AHK do this?

16 Oct 2018, 16:30

@Dewd

Wow! Thanks

One last, Can I the key for the button "fn" I think that's function button?
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Can AHK do this?

16 Oct 2018, 16:41

likely no.
the FN key is usually handled by the keyboard driver
bugzy
Posts: 9
Joined: 16 Oct 2018, 14:50

Re: Can AHK do this?

16 Oct 2018, 18:26

Thanks swagfag

Really really one last here..

How can I replace the control button to alt button instead?
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Can AHK do this?

16 Oct 2018, 18:31

bugzy wrote:
16 Oct 2018, 18:26
How can I replace the control button to alt button instead?
Replace ^ with !

^ is Ctrl
! is Alt
User avatar
Tigerlily
Posts: 377
Joined: 04 Oct 2018, 22:31

Re: Can AHK do this?

16 Oct 2018, 18:56

Check out this part of the documentation on Special Keys, may help you in your unique situation:

https://www.autohotkey.com/docs/KeyList.htm#SpecialKeys
-TL
bugzy
Posts: 9
Joined: 16 Oct 2018, 14:50

Re: Can AHK do this?

18 Oct 2018, 16:03

Hello guys I tried changing the control button to alt with my code

alt::Send, ! is Alt

as per instruction above. But it's not working. Can you guys give me the exact code? I really don't have any knowledge when it comes to coding.
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Can AHK do this?

18 Oct 2018, 16:11

Code: Select all

#SingleInstance, Force

Toggle := 0 ; Initialize variable with starting value of zero

F12::
	Toggle := !Toggle ; If Toggle equals 1, change to zero. If Toggle equals zero, change to 1.
return

#If (Toggle = 1)
	Down:: ; Copy
		Send, !c
	return

	Left:: ; Select All
		Send, !a
	return

	Right:: ; Paste
		Send, !v
	return
#If
bugzy
Posts: 9
Joined: 16 Oct 2018, 14:50

Re: Can AHK do this?

18 Oct 2018, 16:20

@Dewd

Thanks but this is a total different code request by the way. Forget about the copying pasting.

My request is just simple like

How can I change the control button with alt button?
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Can AHK do this?

18 Oct 2018, 16:24

Ctrl::Alt
bugzy
Posts: 9
Joined: 16 Oct 2018, 14:50

Re: Can AHK do this?

18 Oct 2018, 16:59

TheDewd

It's not working. I'm asking for the code because my left ctrl button is broken.

Is the code as is? or do I need to put something else?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], LepG, mapcarter, OrangeCat and 251 guests