Lbutton down

Get help with using AutoHotkey and its commands and hotkeys
Swift
Posts: 9
Joined: 23 Sep 2017, 03:40

Lbutton down

27 Dec 2018, 04:37

How to hold down left mouse button key on a specifc loaction and specific app.
im just a beginner :) :)
eqv
Posts: 66
Joined: 18 Sep 2018, 22:17

Re: Lbutton down

27 Dec 2018, 10:28

I think the easiest way is (replace "notepad" with your program, 15[Y position], 62[X position]):

Code: Select all

;; Drag from the start of a notepad.
WinActivate, ahk_exe notepad.exe
MouseClick,, 15, 62,, 0, D
In case you don't want to lose focus on your active program:

Code: Select all

;; Drag from the start of a notepad.
ControlClick, x15 y62, ahk_exe notepad.exe,,,, NA D
The documentation for each one:
https://autohotkey.com/docs/commands/MouseClick.htm
https://autohotkey.com/docs/commands/ControlClick.htm

Greetings,
Swift
Posts: 9
Joined: 23 Sep 2017, 03:40

Re: Lbutton down

27 Dec 2018, 11:51

eqv wrote:
27 Dec 2018, 10:28
I think the easiest way is (replace "notepad" with your program, 15[Y position], 62[X position]):

Code: Select all

;; Drag from the start of a notepad.
WinActivate, ahk_exe notepad.exe
MouseClick,, 15, 62,, 0, D
In case you don't want to lose focus on your active program:

Code: Select all

;; Drag from the start of a notepad.
ControlClick, x15 y62, ahk_exe notepad.exe,,,, NA D
The documentation for each one:
https://autohotkey.com/docs/commands/MouseClick.htm
https://autohotkey.com/docs/commands/ControlClick.htm

Greetings,
does it work for you i dont know if im doing it wrong or it just aint possible
eqv
Posts: 66
Joined: 18 Sep 2018, 22:17

Re: Lbutton down

27 Dec 2018, 15:32

Swift wrote:
27 Dec 2018, 11:51
eqv wrote:
27 Dec 2018, 10:28
I think the easiest way is (replace "notepad" with your program, 15[Y position], 62[X position]):

Code: Select all

;; Drag from the start of a notepad.
WinActivate, ahk_exe notepad.exe
MouseClick,, 15, 62,, 0, D
In case you don't want to lose focus on your active program:

Code: Select all

;; Drag from the start of a notepad.
ControlClick, x15 y62, ahk_exe notepad.exe,,,, NA D
The documentation for each one:
https://autohotkey.com/docs/commands/MouseClick.htm
https://autohotkey.com/docs/commands/ControlClick.htm

Greetings,
does it work for you i dont know if im doing it wrong or it just aint possible
Have you tested in notepad? It works as I expect; how it respond may depend on the program that you are trying to apply.

Return to “Ask For Help”

Who is online

Users browsing this forum: boiler, frosse, malcev, navmesh, teadrinker, Zamfir and 67 guests