evilC / AutoHotInterception

An AutoHotkey wrapper for the Interception driver
MIT License
708 stars 64 forks source link

Add support for Unsubscribing #20

Closed evilC closed 5 years ago

evilC commented 6 years ago

Allow subscriptions to be removed in Subscription Mode

MartinLichtblau commented 5 years ago

Isn't that a must have? Else you would waste so much performance just by listening, although you don't need them at the moment.

evilC commented 5 years ago

I don't understand what you are saying. Are you maybe thinking that subscriptions persist between runs of scripts? They don't. This is basically the equivalent of an AHK command like Hotkey, F1, Off, which is not a very common thing to do.

MartinLichtblau commented 5 years ago

If so, then I have to change the organization of my scripts. I wanted to keep one global AHI object for all scripts for efficiency reasons. One feature is to scroll by moving the mouse, as long a certain button is pressed. So if it is pressed do AHI.SubscribeMouseMoveRelative(trackpadId, false, Func("MouseEvent")). But what to do if the button is released? I had it all in one script with many other hotkeys and I run it only once on win-login. So, should I put the AHI-related code in another script and exit in on release?