Suspend is not enough, even Pause in not enough - how to solve it instead of AHK script terminate?

Get help with using AutoHotkey and its commands and hotkeys
MIRKOSOFT
Posts: 329
Joined: 23 Sep 2014, 14:29

Suspend is not enough, even Pause in not enough - how to solve it instead of AHK script terminate?

01 Dec 2019, 19:34

Hi!

I found application which detects no input while I have AHK script running, suspended, even paused.
I must to terminate script and then application detects input.

Is possible by any way to block AHK script instead of terminate?
I have no idea.
Can anybody help me?

Thank you for all help, suggestions, comments and replies.
Miro
pneumatic
Posts: 299
Joined: 05 Dec 2016, 01:51

Re: Suspend is not enough, even Pause in not enough - how to solve it instead of AHK script terminate?

01 Dec 2019, 20:06

I encountered something like that, but it only occurs when all of the following conditions occur simultaneously:

1. My script is running as administrator
2. My script's GUI window is visible and activated
3. The application which suffers from blocked input is running at a lower "integrity" level (i.e not as an administrator)

Integrity level for apps can be viewed with Sysinternals Process Explorer app.

In my case the logitech software which runs in the background and manages my mouse's side button hotkeys is blocked by autohotkey when 1,2,3 is satisfied.

My solution was to force logitech software to run as administrator, so it is at the same integrity level as ahk.
MIRKOSOFT
Posts: 329
Joined: 23 Sep 2014, 14:29

Re: Suspend is not enough, even Pause in not enough - how to solve it instead of AHK script terminate?

02 Dec 2019, 02:25

I tried to run that application in real-time, also as admin.
Nothing helped.
Really don't know how to start AHK not as admin - I'm starting script - so AHK file.
Nowhere, even in Startup applications is AHK.

I tried process monitor - but it is lot of info - where to find integrity level?
I know that these Qs looking that I'm dumb, so please forgive me.
Miro
pneumatic
Posts: 299
Joined: 05 Dec 2016, 01:51

Re: Suspend is not enough, even Pause in not enough - how to solve it instead of AHK script terminate?

02 Dec 2019, 18:22

MIRKOSOFT wrote:
02 Dec 2019, 02:25
Really don't know how to start AHK not as admin - I'm starting script - so AHK file.

If your Windows has a non administrator user account available, put the ahk executable (which is probably in c:\program files\autohotkey) alongside your ahk file and rename the exe to the same as the ahk file, then shift+right click on exe > run as a different user.

If your Windows only has an admin account, I think it's determined by Windows security policy - start > run > secpol.msc > local policies > security options. Look at settings starting with "Accounts" and "User Account Control".

MIRKOSOFT wrote:
02 Dec 2019, 02:25
I tried process monitor - but it is lot of info - where to find integrity level?

View > Select columns > Process image > tick "Integrity Level".

High = running as admin
Medium or below = not admin

Other things you can try

-remove #InstallKeyboardHook or #InstallMouseHook from your script if you have them
-try #KeyHistory 0
-try SendMode Input
MIRKOSOFT
Posts: 329
Joined: 23 Sep 2014, 14:29

Re: Suspend is not enough, even Pause in not enough - how to solve it instead of AHK script terminate?

07 Dec 2019, 12:54

Ok, I got it work - but:

1. I started Process Explorer and changed priority for AHK below normal
2. I started application and set priority real-time
and it works...
so, I closed Process Explorer and application.
I set application for all users Run as admin - btw. my PC has single account only and it is admin - so I did it for all users only to be sure.
Started application and again - same problem.

It looks like it needs to start AHK in lower priority - maybe even at startup.
I know how to run as admin, also in context menu have priority option, but don't know how to set lower priority by command.

Can you help me?
Miro

Return to “Ask For Help”

Who is online

Users browsing this forum: Albireo, caihoptrenkesach, Google [Bot], mikeyww and 75 guests