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

Post your working scripts, libraries and tools
OCP
Posts: 83
Joined: 28 Mar 2018, 19:28

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

17 Apr 2018, 06:49

i know the problem is i do not have that box anywhere on any file the stuff in red just isnt there
Attachments
2.jpg
2.jpg (12.55 KiB) Viewed 708 times
Last edited by OCP on 20 Jun 2018, 03:16, edited 1 time in total.
User avatar
evilC
Posts: 4354
Joined: 27 Feb 2014, 12:30

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

17 Apr 2018, 07:02

AHA!

I get that error if Interception.dll (The one you should have copied from your interception folder into the lib folder) does not exist.

I should maybe alter the code to double-check that.
Did you maybe fail to copy in the Interception dll?

Your lib folder should look like this:
(The selected file is the one you need to copy in from the folder where you installed Interception)
Image
Last edited by evilC on 17 Apr 2018, 07:04, edited 1 time in total.
OCP
Posts: 83
Joined: 28 Mar 2018, 19:28

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

17 Apr 2018, 07:04

yeah still errors

the pic above is not from any of my files tho this is how mine looks on all files
Attachments
1.jpg
1.jpg (49.58 KiB) Viewed 699 times
Last edited by OCP on 20 Jun 2018, 03:17, edited 1 time in total.
OCP
Posts: 83
Joined: 28 Mar 2018, 19:28

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

17 Apr 2018, 07:13

well it turns out i had the wrong interception dll copied now it will not give me an error but the monitor script just closes itself the other examples give me an could not get keyboard with vid blablabla but that is to be expected since i did not alter anything jet

in interception zip i downloaded there was 3 of them a bit confusing what to actually use from that

making progress tho now i need to figure out the monitor itself
Last edited by OCP on 20 Jun 2018, 03:17, edited 1 time in total.
OCP
Posts: 83
Joined: 28 Mar 2018, 19:28

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

17 Apr 2018, 07:47

i get this error now (converted the monitor to an exe to be able to see this if i keep it as a .ahk i do not get a message then it just closes

)
Attachments
3.jpg
3.jpg (10.58 KiB) Viewed 686 times
Last edited by OCP on 20 Jun 2018, 03:17, edited 1 time in total.
User avatar
evilC
Posts: 4354
Joined: 27 Feb 2014, 12:30

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

17 Apr 2018, 10:31

I dunno if AHI supports compiling to an EXE, would not be surprised if it does not work due to the way it tries to locate the DLL.

So the script full-on exits (no icon in tray), or you just don't see the GUI?
OCP
Posts: 83
Joined: 28 Mar 2018, 19:28

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

17 Apr 2018, 11:02

if i just run monitor.ahk it will come in the tray but if i hover over it goes away so it just closed right after i opened it i think due to the tray not refreshing i never get to see a gui

i am sorry evilC to have nothing but problems to report

i tried other ways for getting my vid/pid numbers one of them the ahkhid examples (example 1) under keyboards i get 3
\\?\HID#VID_1A2C&PID_2124&MI_00#7&1c0145ac&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}
\\?\HID#VID_413C&PID_2010&MI_00#8&13416ba9&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}
\\?\Root#RDP_KBD#0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}

and another just windows hardware id that gives me this
extra HID\VID_1A2C&PID_2124&REV_0110&MI_00
main USB\VID_413C&PID_1003&REV_0200

HID 1A2C VID 2124 my extra keyboard
HID 413C VID 1003 my main (only my main needs 10 keys to be fixed)

isn't this all i need?
Last edited by OCP on 20 Jun 2018, 03:17, edited 2 times in total.
OCP
Posts: 83
Joined: 28 Mar 2018, 19:28

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

17 Apr 2018, 11:28

if i activate debug and hit f5 i get a screen that closes so fast i cant read it but i recorded it and grabbed the frame see image

if i run it inside scrite i get this

>"C:\Program Files\AutoHotkey\AutoHotkeyU64.exe" /ErrorStdOut "C:\AHK V3\AutoHotInterception\Monitor.ahk"

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
at System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)
at System.Reflection.AssemblyName..ctor(String assemblyName)
at System.Reflection.Assembly.LoadWithPartialName(String partialName)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
>Exit code: 3221225477 Time: 3.43

must be still the dll's not sure how to proceed i don't have that unblock box in my windows and i already give the dlls full control
Attachments
1.jpg
1.jpg (12.32 KiB) Viewed 661 times
Last edited by OCP on 20 Jun 2018, 03:17, edited 1 time in total.
User avatar
evilC
Posts: 4354
Joined: 27 Feb 2014, 12:30

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

17 Apr 2018, 12:24

Unless you add a breakpoint, then enabling debug mode and hitting F5 is not much different to running the script normally.
You get exception messages like the one above, but I dunno what AHK line generated it.
Hit F11 instead of F5, to step thru the code...
User avatar
evilC
Posts: 4354
Joined: 27 Feb 2014, 12:30

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

17 Apr 2018, 12:32

Also I notice you are using x64 AHK.
AutoHotInterception.dll does not seem to load for me if I switch to x64
No real reason to not use x86 AHK - x86 works on x64 and x86 systems, x64 only works on x64 systems.
OCP
Posts: 83
Joined: 28 Mar 2018, 19:28

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

17 Apr 2018, 13:41

yeah the v3 is my intended v3 version of my keyboard script i am trying to make now not related to ahk
that f11 gives me the same thing same flash screen
aha i will install ahk 86 and see if that helps
Last edited by OCP on 20 Jun 2018, 03:17, edited 1 time in total.
OCP
Posts: 83
Joined: 28 Mar 2018, 19:28

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

17 Apr 2018, 13:59

thnx that was it i run ahk 32 now and the monitor works :) thnx for all the help appreciate it
Last edited by OCP on 20 Jun 2018, 03:18, edited 1 time in total.
OCP
Posts: 83
Joined: 28 Mar 2018, 19:28

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

17 Apr 2018, 14:29

i was a bit early being happy i should have said the monitor gui is working but it is not giving me any data because (i found out in debug mode) the AutoHotInterception.dll failed to load

i tried so many things unblocking those dll's
i zipped them then i could set properties of the zip to unlock so then all comes out unlocked
i even made a fat32 partition coz i read somewhere that security data is being deleted if you put it on that
i went into powershell put the policy to unresticted still no effect

you have any idea how to "fix" those dll's
Last edited by OCP on 20 Jun 2018, 03:18, edited 1 time in total.
OCP
Posts: 83
Joined: 28 Mar 2018, 19:28

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

17 Apr 2018, 14:50

i get this screen
Attachments
1.jpg
1.jpg (35.47 KiB) Viewed 618 times
Last edited by OCP on 20 Jun 2018, 03:18, edited 1 time in total.
User avatar
evilC
Posts: 4354
Joined: 27 Feb 2014, 12:30

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

17 Apr 2018, 15:14

OK, so it's completely failing to get a device list, but I don't understand how it is not throwing an error.

https://github.com/evilC/AutoHotInterce ... on.ahk#L23

Code: Select all

		try {
			this.Instance := asm.CreateInstance("AutoHotInterception." cls)
		}
		catch {
			MsgBox % dllName " failed to load`n`n" hintMessage
			ExitApp
		}
		if (this.Instance.OkCheck() != "OK"){
			MsgBox % dllName " loaded but check failed!`n`n" hintMessage
			ExitApp
		}
I just don't get how the code gets past this point (Which if it is showing a GUI, it must have), but has not quit out. How come you only find out in debug mode?

Return to “Scripts and Functions”

Who is online

Users browsing this forum: gwarble and 34 guests