Search found 4820 matches

by evilC
21 Mar 2023, 14:52
Forum: Scripts and Functions (v2)
Topic: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Replies: 12
Views: 3127

AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!

Now compatible with AHK v2! Old AHK v1 thread What can it do for me? AHI allows you to react to keyboard and mouse events in much the same way as AHK does, only with multiple keyboards and/or mice. It can work in two modes (Both work at the same time) Context mode is the simplest - you wrap your nor...
by evilC
09 Feb 2023, 11:41
Forum: Scripts and Functions (v1)
Topic: CGDipSnapShot - GDI replacement for PixelGetColor
Replies: 74
Views: 30927

Re: CGDipSnapShot - GDI replacement for PixelGetColor

I need your help, how can I use this code only with CGDipSnapShot ? There was no included function previously to do this, but I just added a new function "PixelSearch" to the library. You can now do what you wish like this: #include CGdipSnapshot.ahk ; Create a snapshot object specifying your searc...
by evilC
24 Oct 2022, 16:15
Forum: Scripts and Functions (v1)
Topic: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick buttons
Replies: 110
Views: 44251

Re: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick button

#if is a directive, so should have no effect on THM (It only affects hotkeys declared using a:: type syntax, which THM does not use)
Use hotkey, if, GetKeyState("Xbutton1", "P") instead
by evilC
29 Aug 2022, 14:11
Forum: Scripts and Functions (v1)
Topic: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick buttons
Replies: 110
Views: 44251

Re: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick button

Would you say one way is preferred over the other if I plan to have various TapHoldManager instances Using the hotkey, if method will take effect for all subsequently declared sequences (ie thm.Add) calls, regardless of which THM instance is used. For that reason, it would probably result in shorte...
by evilC
29 Aug 2022, 03:06
Forum: Scripts and Functions (v1)
Topic: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick buttons
Replies: 110
Views: 44251

Re: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick button

I can help you with your 1st question. Context sensitivity has always been tricky with THM. But that's why the genius EvilC made it easy for us. Just add the program to this part :arrow: thm := new TapHoldManager(150, 300, , "$*","ahk_exe explorer.exe") ) D'oh, I completely forgot about that - it w...
by evilC
28 Aug 2022, 15:20
Forum: Scripts and Functions (v1)
Topic: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick buttons
Replies: 110
Views: 44251

Re: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick button

Jasonosaj Everything you mentioned is as I would expect the code to work. There is no such thing as "Pressing two keys at the same time" insofar as it is impossible to hold two keys EXACTLY at the same time. It sounds to me that what you want is something like Holding Caps to enter a mode, then whe...
by evilC
28 Aug 2022, 15:08
Forum: Scripts and Functions (v1)
Topic: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick buttons
Replies: 110
Views: 44251

Re: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick button

Epoch #IfWinActive is a context mode settings for mappings in the form of a::b (ie ones that are effectively directives, and not part of the flow of code. you need to use Hotkey, IfWinActive, ahk_exe explorer.exe on a line BEFORE a THM subscription, like so: thm := new TapHoldManager(150, 300, , "$...
by evilC
22 Jun 2022, 03:41
Forum: Scripts and Functions (v1)
Topic: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick buttons
Replies: 110
Views: 44251

Re: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick button

Yes, it's totally possible - at the end of the day, which hotkey is used is ultimately goverened by a call such as thm.Add("1", Func("MyFunc1")) - so in this example, you just need to read a value from the ini file into a variable and instead call thm.Add(valueFromIniFile, Func("MyFunc1")) Being abl...
by evilC
17 Jun 2022, 19:02
Forum: Scripts and Functions (v1)
Topic: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick buttons
Replies: 110
Views: 44251

Re: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick button

Jasonosaj if (isHold=1) & (taps=2) & (state=0){ will activate on the release of a double tap and hold. ie hold shift + alt, press s, quickly release s, press s, WAIT, release s, release shift + alt ie a tap of S and then a hold of S, whilst holding shift + alt This triggers perfectly reliably for m...
by evilC
28 Apr 2022, 11:04
Forum: Scripts and Functions (v1)
Topic: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick buttons
Replies: 110
Views: 44251

Re: TapHoldManager - Long Press / Multi Tap / Multi Tap and Hold / Any number of Taps / Multi-Keyboard / Joystick button

aacsel wrote:
27 Apr 2022, 21:47
Hi, I need help with this code.
I want to use LShift to press enter but if i hold LShift the key works normally
Your code does not subscribe to LShift, it subscribes to 1 and 2
So of course LShift will continue to work as normal
by evilC
17 Jan 2022, 12:15
Forum: Scripts and Functions (v1)
Topic: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Replies: 345
Views: 198176

Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!

AHI 0.7.0 has been released https://github.com/evilC/AutoHotInterception/releases The intention of this release is to clean up the AHI C# source code - apart from the few bugfixes mentioned in the changelog, nothing should have changed - you are encouraged to test and make sure I didn't balls things...
by evilC
14 Jan 2022, 13:07
Forum: Scripts and Functions (v1)
Topic: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Replies: 345
Views: 198176

Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!

AHI 0.6.0 has been released https://github.com/evilC/AutoHotInterception/releases Input should now be processed significantly faster. A bunch has changed, and I have concerns as to whether I have broken anything, so please test and report any problems. Things to test: * Mouse Movement scripts (These...
by evilC
10 Jul 2021, 13:08
Forum: Gaming Scripts (v1)
Topic: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017
Replies: 40
Views: 32979

Re: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017

It calls 1, but that's just to get the minimum granularity. Either C#'s Thread.Sleep(10) or AHK's Sleep 10 / SetTimer, Foo, 10 won't be at 10ms, it will typically be at like ~14ms (It depends on system configuration), which is the lowest granularity supported. If you want to go lower, you need to us...
by evilC
10 Jul 2021, 11:29
Forum: Gaming Scripts (v1)
Topic: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017
Replies: 40
Views: 32979

Re: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017

Right - also in addition to the polling loop, the code deciding if anything has changed is all handled for you in my library (And again, is done in compiled code) - but TBH the amount of CPU time involved is probably pretty meaningless. This is of course assuming that you are using SetTimer to poll ...
by evilC
10 Jul 2021, 10:54
Forum: Gaming Scripts (v1)
Topic: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017
Replies: 40
Views: 32979

Re: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017

Yes, that's XInput (Xbox controller specific API), I was talking about DirectInput (Generic joystick / HOTAS controllers etc). In AHK normally these are read via GetKeyState("1JoyX") , which yields a value from 0 to 100, with middle being 49.97. This is implemented in the AHK source code using the l...
by evilC
09 Jul 2021, 13:50
Forum: Gaming Scripts (v1)
Topic: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017
Replies: 40
Views: 32979

Re: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017

Oh, and one final pro/con... Lexikos' XInput library lets you read the Guide button, whereas SharpDX does not (It's an undocumented feature not officially part of the XInput spec). However you can't block the native functionality of the Guide button with either, so it's pretty useless anyway in my e...
by evilC
09 Jul 2021, 13:47
Forum: Gaming Scripts (v1)
Topic: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017
Replies: 40
Views: 32979

Re: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017

It's also worth adding that there's more of a benefit to doing DirectInput reading via SharpDX - trying to poll directinput using native AHK calls would probably be hella tricky, and whilst you can already read DI devices using GetKeyState, that's limited to 6 axes, 32 buttons whereas SharpDX gives ...
by evilC
09 Jul 2021, 13:43
Forum: Gaming Scripts (v1)
Topic: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017
Replies: 40
Views: 32979

Re: [Alpha]JoystickWrapper: Read Joysticks via DirectInput / XInput without loops (C# DLL) 0.0.5 - 18th Mar 2017

You may see less CPU usage due to the loop being in compiled code rather than interpreted? That may, however be offset by the overhead of the interop between C# and AHK

Go to advanced search