This really isn’t a macOS issue per se, it’s a mouse driver for macOS issue. Logitech does provide a perfectly functional option for assigning a triple-click to a mouse button depending on the software and model of mouse supported. For example, with Logitech Options and the M720 Triathlon, select Mouse, select a button, select Click, and then select Triple click:
Another example, with Logitech Options+ and the Signature M650 L, select the mouse, select Buttons, select a button, select Advanced click, and then select Triple click:
If you have a Logitech gaming mouse, such as the G703 and use Logitech G Hub software, your options are limited for triple-click implementation. By comparison, a double-click button assignment is trivial: select the mouse, select the Assignments icon (+), select System, and drag Double Click onto the button of your choice:
Logitech is capable of offering a simple option to add triple-click as they do with double-click. Why they don’t is inexplicable. That leaves one with the option of using a macro in G Hub in combination with other utilities to patch a workaround together. If you simply create a macro to record mouse clicks, and then run the macro by depressing the assigned mouse button, it will fail to select text. However, it will click on hyperlinks, buttons, and function for inserting a cursor.
I’ve tried the following two methods, both of which work. The AppleScript is somewhat faster than the cliclick script. Save the following AppleScript to your Scripts folder as a .scpt file. Assign a keyboard shortcut in FastScripts, or use another method of your choice. In G Hub, create a no repeat macro to record the keyboard shortcut. Delete all the delays. Then just assign the macro to a mouse button.
-- From Fredrik71 at https://macscripter.net/viewtopic.php?pid=207491#p207491 with modified delay.
use framework "Foundation"
use framework "Quartz"
use scripting additions
delay 0.5
clickAtPosition(3)
on clickAtPosition(clickRepeatTimes)
set {width, height} to item 2 of (current application's NSScreen's mainScreen())'s frame()
tell current application's NSEvent to set thePosition to |mouseLocation|()
repeat clickRepeatTimes times
current application's CGPostMouseEvent({thePosition's x, height - (thePosition's y)}, true, 1, true)
current application's CGPostMouseEvent({thePosition's x, height - (thePosition's y)}, true, 1, not true)
end repeat
end clickAtPosition
The second method involves using cliclick as the click engine with a triple-click at current cursor position command (cliclick tc:.) saved in a shell script as a .sh file in your Scripts folder. You'll need to run chmod 755 on it in Terminal to make it executable.
#!/bin/zsh
/usr/local/bin/cliclick tc:.
If you prefer an AppleScript version:
do shell script "/usr/local/bin/cliclick tc:."
As with the AppleScript, assign a keyboard shortcut in FastScripts or by using another scripting utility. In G Hub, create a no repeat macro to record the keyboard shortcut. Delete all the delays. Then just assign the macro to a mouse button.
This next part is important. In use, when selecting a block of text such as a paragraph, there are some apps that only require you to statically click the macro assigned button, but other apps require that the cursor be moved from its initial on-click position. The cursor needs to move, but not very far. Otherwise, the text selected may be wrong or incomplete. Moving the cursor in all apps is not a bad idea. One thing to keep in mind is that this workaround will be somewhat slower than if natively built into the mouse driver.
Mac mini (2018), macOS Monterey Version 12.3.1