AutoHotkey #IfWinNotActive not activating - autohotkey

I like having my middle mouse button be a double click, so I have an .ahk script to make that happen, but a lot of programs I use (particular ones involving a 3D environment like Autodesk stuff) need the middle mouse button to function normally, so I have this script:
#SetTitleMatchMode, 2
#IfWinNotActive, Autodesk
MButton::send, {LButton}{LButton}
All this does is make the double click work constantly. As if it's ignoring the WinNotActive completly. I have no idea why this doesn't work. I've tried a few things to see if I could fix it myself, but I made no progress.
Please remember that kind and respectful responces are greatly appreciated.

Context-sensitive directives apply to all following hotstrings and hotkeys. Thus, you have to "reset" this behaviour and limit the scope with another #ifWinNotActive:
#SetTitleMatchMode, 2
#IfWinNotActive, Autodesk
MButton::send, {LButton}{LButton}
#IfWinNotActive
(see https://autohotkey.com/docs/commands/_IfWinActive.htm#Basic_Operation for details)

Related

Atom popup, really annoying

I have no idea what plugin is doing this, but it's incredibly annoying everytime I move mouse mouse to constantly get a popup. When I am coping and pasting code it pops up, and I have to click somewhere else, and it blocks so much of screen. Anyone know what plugin might be doing this?
For me, this was happening because of the atom-ide-datatip package. I went into the settings for that package and unchecked "Show datatip automatically on mouse hover", and checked "Show datatip automatically on cursor stay" as that got in the way for me less.
In my opinion, it would be nice if you could turn off those datatips for certain data types, like int and str. I mostly use this package for the function parameter popups.

Move Cursor Down? VS Code Keyboard Shortcut

I want to move my input cursor down 1 line.
Is there a way to bind cursor movement in the keyboard shortcuts interface?
Update: I have actually found myself in Notepad++ whenever I'm just too tired to wrestle with my text cursor...
So Far
In other software, I use the down arrow. In VS Code, this scrolls auto-fill suggestions.
Formerly, I used a two-key combination: left arrow and down arrow, one to cancel suggestions, one to move the cursor. This no longer works. Suggestions persist.
I've looked everywhere for an answer. There are 0 alternatives, correct? The move cursor down exclusive functionality is simply not available in any way in the current version of VS Code.
Non-configurably eliminated from the software's design.
Inadequate Solutions
I can hit escape, but like the mouse, that means lifting one hand. When editing dozens of lines of index assignations (ugly optimization, don't ask), my arm actually starts to burn from the rapid movements. The process is painfully slow.
I cannot disable suggestions or summon them with ctrl+space, because I use them with every identifier I type (via tab), multiple times per line.

Macro Keys not Detected AutoHotkey

I have just purchased the Steelseries apex gaming keyboard and rival mouse. Unfortunately, each of these products has different software for macros and keyboard lighting, both of which are mediocre at most.
Instead of having 2 processes running in the background and having to use 2 crappy programs to write my macros, I have decided to use AutoHotkey for my macros, some of which I plan on making quite complex. The mouse was no problem in AutoHotkeys, with the two side buttons using XButton1 and XButton2, however no matter what I do, I can't detect my keyboard macro keys (M1 to M12 and MX1 to MX10).
Using a keyboard hook doesn't detect any keys, and looking online I can't find how to reference these keys either. I'm not even sure windows sees them, as when I try to input them into the shortcut key field in a normal shortcut they do nothing. So my questions are:
What is the name for the macro keys on my keyboard in AutoHotkey?
Is there any way to work around this problem without having to use the Steelseries Engine?
If I can't access them normally, is there a way to reassign them without external software?
(Optional) Is there any way to adjust the lighting on the keyboard and mouse without the Steelseries software as well?
Btw I'm using Windows 8 and here are the links to the mouse and keyboard. Thank you in advance.
You can get the name for special keys that are not listed in AutoHotkey documentation by following steps here.
Some notes and explanations:
You can use that script for step 1:
#InstallKeybdHook
Sleep, 99999999999999999999
When you run it, check if keyboard hook is active by:
press here:
then here:
and if active, you should see something like here:
In the step 6 the hex value column is here:
If that is not working for you, try Alternate solutions in the link that I provided before.

Modify stylus behavior in any tablet

I just read this post about there being no way to fully use the stylus buttons, nor movements:
http://www.autohotkey.com/board/topic/91828-stylus-middle-mouse-button-emulation/
And I think that there should be some available workaround for this by now.
To clearly state my question: Is there a way to use AutoHotkey (or other program) to modify the stylus buttons (including the on screen actions like click and hold) in a similar fashion as the keyboard?
An example of what I am looking for in AutoHotkey is to be able to press pen against screen and at the same time click any button as a hotkey using e.g. GetKeyState.
One suboptimal workaround that I know for this is to use something like these: http://alternativeto.net/software/strokesplus/
And have them send some keyboard combination as output, which AutoHotkey can act on. This would probably work, but would require another program, and essentially make AutoHotkey redundant for the most basic things. Once you add GetKeyState etc functionality from AutoHotkey the two together should make for a vast amount of possible combinations not possible by either alone though.

ControlClick is not working

My script is supposed to press a button somewhere in my window, upper left. It is not working as it should be. I tried this:
ControlClick ClassNN ThunderRT6UserControlDC29, ahk_class ThunderRT6FormDC
Yet it doesn't work.
I tried the manual option:
Controlclick x160 y60, ....
But that doesn't work as well.
Eventually I resorted to a mere:
Click 160, 60 and that does work.
I was wondering why it is behaving like that? Also, is there a way for merely the button to get pressed without the mouse actually going all the way over there. I looks stupid and it is slow.
The main reason for me asking this question is because it is closely related to another question I posed:
How to obtain textual contents from a window
The common denominator is that anything with classNN and ahk_class seems to be problematic.
Try running script as a administrator (if you're on Windows 7 or Vista)
I finally found my own solution after skimming the documentation more thoroughly:
https://autohotkey.com/docs/commands/ControlClick.htm#Reliability
You can specify NA as the sixth parameter to wait for the mouse button to lift.
I found that when firing Control, Check, ,Button1 prior to ControlClick the click didn't work, but adding the NA to the end somehow magically fixed it. I suppose a click was being simulated and had not yet lifted.
First, make sure you have the capitalization correct. controlclick is case and space sensitive - everything in the name has to be correct.
Second, for your mouse-moving issue - first save the position of your mouse, then controlclick, and then put your mouse back where you found it. The mouse will only be out of place for the duration of either the click or the timeout. 160ms is not noticeable.
You might also try using ahk to activate the window, bringing it the front, and then seeing if you can tab through the controls to the one you want, and then push it by sending keys like space or return to the window in the forefront (which you have activated). This avoids using controlclick altogether. Some windows can be tricky.
Controlclick x160 y60,A,,Left,1, NA
Manual option like that should work,at least in my case it worked.
Left = your mouse button pressed
1 = number of clicks
A = Active Window
Also options to retrieve contents from the games or retrieve variables from other autohotkey parts for ControlClicks or SendMessage/PostMessage seem to not work yet.