I am using Mp3tag. In its main window is a list of files. A user can select one of them by left clicking them - or hold down the
CTRL key and select and deselect with left clicks multiple files. And also if
SHIFT is pressed down, then the user is able to select an area [thus multiple files] with left click [or with arrows]
So I wanted to be able to that without keyboard, just using mouse - and for that to utilize the middle button, which is totally unused in Mp3tag
And so, this works
Code: Select all
#If WinActive("ahk_exe C:\Program Files\Mp3tag\Mp3tag.exe")
MButton::Send {Control down}{LButton down}{LButton up}{Control up}
in that I can use middle button to select many files one-by-one and also remove them one-by-one. And if some files are selected, then a left click just cancels that selection and highlights just one file [the one under the pointer of course]. So that is OK but not A-OK. Because if I middle click on a file [for selection] and then once again middle click that same file [for deselection because I made a mistake] then a field of that file with data [like
_FILENAME] turns into edit mode, where I can re-write stuff. And that is natively impossible to do and I do not want it happening. I tried upgrading the code to
Code: Select all
MButton::
Send {Control down}{LButton down}
Sleep 300
Send {LButton up}{Control up}
return
and changing the
Sleep value; but that only slightly alleviates this issue as that unwanted edit mode can still happen, as Mp3ag still registers middle click as left click without
CTRL thus leading to a situation that is not suppose to happen [editing one file while also others are selected]. I tried also some
KeyWait variations in place of Sleep and shuffling the order of key / button inputs - but failed as they were making Mp3tag or the whole system user un-friendly / glitchy or just plain unusable
So my first question is: how eliminate that switching to edit mode?
Second question is: How to also add that second way of selecting of many files [i.e. with SHIFT being held down] but still using the same middle button [that has to works with CTRL]
Also I have noticed that when running my code, when I use
SHIFT to select some files then I can still add to that selection files one-by-one using the middle button - but I am no longer able to de-select them one-by-one in the same way [which I can do normally when the script is not running]