mouse down ctrl down mouse up ctrl up Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
204squares
Posts: 6
Joined: 21 Jul 2018, 13:43

mouse down ctrl down mouse up ctrl up

21 Jul 2018, 13:49

Hello,

I'm sure the answer's somewhere in this forum and the help files, but i'm not sure how to find it...

I want hotkey 'c' to wait for left mouse button down then press left control down and wait for left mouse button up to do left control up.

Thanks!
User avatar
Scr1pter
Posts: 1272
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: mouse down ctrl down mouse up ctrl up

21 Jul 2018, 18:24

What about

Code: Select all

c & lbutton::
Send ^c
return
?

But keep in mind that in this case, C doesn't do anything.
When you want to use the c alone, it won't work.

Otherwise you will have to work with GetKeyState.
I did some quick tests - none of them worked.

Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
204squares
Posts: 6
Joined: 21 Jul 2018, 13:43

Re: mouse button controls Ctrl

22 Jul 2018, 07:07

Let's say the hotkey is alt-c.

If mouse button is down then make Ctrl down. If mouse button is not down wait for mouse button down and then press Ctrl. (Mouse movement takes place). When mouse button is up release Ctrl.

What commands do I need to use for this?

Thanks!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 325 guests