Click and select down

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
translatorgreek
Posts: 11
Joined: 17 Jul 2019, 03:10

Click and select down

Post by translatorgreek » 14 Aug 2022, 05:15

I want to be able to click on a point in a document (in this program Ctrl+A does not work, neither click at one point, scroll down, press Shift, click again to select whole range) and then select all the way to the end of it. So we have 2 actions:

1. Left click (and keep it pressed)
2. Move the mouse downwards to the end of the document (until there is no more moving possible)

I did try to search but could not find any solution for this.

User avatar
mikeyww
Posts: 26599
Joined: 09 Sep 2014, 18:38

Re: Click and select down

Post by mikeyww » 14 Aug 2022, 06:19

Code: Select all

GroupAdd, select, ahk_exe notepad.exe
#IfWinActive ahk_group select
~LButton::
KeyWait, LButton, T.5
Send % ErrorLevel ? "{LButton up}^+{End}" : ""
Return
#IfWinActive


translatorgreek
Posts: 11
Joined: 17 Jul 2019, 03:10

Re: Click and select down

Post by translatorgreek » 14 Aug 2022, 06:39

Thanks mikeyww!

I tried it (replacing notepad.exe with the exe of the actual program) but nothing happens when I click the mouse.

User avatar
mikeyww
Posts: 26599
Joined: 09 Sep 2014, 18:38

Re: Click and select down

Post by mikeyww » 14 Aug 2022, 08:21

You need to hold the left mouse button for 0.5 seconds.

translatorgreek
Posts: 11
Joined: 17 Jul 2019, 03:10

Re: Click and select down

Post by translatorgreek » 14 Aug 2022, 08:37

Thanks, it goes to the end of the document, but does not select it.

I also played around with

Code: Select all

MouseClickDrag, left, 50, 200, 600, 10000
But it stops selecting after a a couple of screens (whereas using half a value of 10000 selects much more!)

User avatar
mikeyww
Posts: 26599
Joined: 09 Sep 2014, 18:38

Re: Click and select down

Post by mikeyww » 14 Aug 2022, 08:40

I tried it (replacing notepad.exe with the exe of the actual program) but nothing happens when I click the mouse.
You can post your revised script below.

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Click and select down

Post by BoBo » 14 Aug 2022, 08:40

Is this an online document? What format??
Have you already checked AHK‘s Help "Remarks" regarding MouseClickDrag?
VarSetCapacity()?
ControlGetText??

translatorgreek
Posts: 11
Joined: 17 Jul 2019, 03:10

Re: Click and select down

Post by translatorgreek » 14 Aug 2022, 08:47

My revised script is the same, but with LDLS.exe instead of notepad.exe. The original script does work with Notepad but I suspect that it may not work on this application because it is done too fast).

It is a reference application in which one can open a document. I get this info with Window Spy.

Code: Select all

Libronix Digital Library System
ahk_class LibronixDLS_Application
ahk_exe LDLS.exe
ahk_pid 692
The closest I got to selecting big chunks was the script I mentioned before:

Code: Select all

^g:: ; CTRL+G
MouseClickDrag, left, 50, 200, 600, 10000

User avatar
mikeyww
Posts: 26599
Joined: 09 Sep 2014, 18:38

Re: Click and select down

Post by mikeyww » 14 Aug 2022, 09:02

OK. Perhaps BoBo knows the answer.

Post Reply

Return to “Ask for Help (v1)”