AHK still running in Background. Task closed. No malware.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
morpheus747
Posts: 3
Joined: 28 Jan 2022, 03:56

AHK still running in Background. Task closed. No malware.

Post by morpheus747 » 28 Jan 2022, 04:44

Hey everyone,

I am running some scripts to arrange Chrome windows in a specific manner on my desktop and start a few more actions.
They are arranged like a cascade to keep the overview.

Skript outtake at the end of this thread.

The problem is that as long as the AHK script is not closed these active Chrome Browser Windows are jumping back and forth in to the background and foreground whenever some action is happening in these windows.

They usually will not do that as long as I arranged them manually with my mouse.

So my solution was to restart my computer and do it manually.
Longterm this will not work. So I tried to run the script (so it arranges all the windows) and ended the process via task bar. (also cant find anything further in the task manager). So in my opinion the AHK should be closed and dead.

But the windows still jump around unless I restart my computer.

Something is still running in the background or conflicting with the active chrome windows. Any idea?
Is there anything I can add to the end that will kill ALL AHK processes that have been run till that point? (My script ends with the "timeout 400"


It reads like this:
.
.
.
.
Start "" "C:\Bid\Links\2"
timeout 4
Start "" "C:\Bid\Links\1"
timeout 15

Start "" "C:\AHK\StartProgram\position.ahk"
timeout 15
Taskkill /im "autohotkey.exe"
timeout 2
Start "" "C:\AHK\StartProgram\outbid bids.ahk"
timeout 15
Start "" "C:\AHK\StartProgram\4h.ahk"
timeout 21
Start "" "C:\AHK\StartProgram\0001bit.ahk"
Timeout 120
Start "" "C:\AHK\StartProgram\Bidstart.ahk"
Timeout 400

User avatar
mikeyww
Posts: 26972
Joined: 09 Sep 2014, 18:38

Re: AHK still running in Background. Task closed. No malware.

Post by mikeyww » 28 Jan 2022, 07:37

Welcome to this AutoHotkey forum!

Running many scripts at the same time can lead to problems when the scripts conflict with each other. Without seeing the scripts, more specific guidance is a challenge!

Taskkill could help you if needed.

morpheus747
Posts: 3
Joined: 28 Jan 2022, 03:56

Re: AHK still running in Background. Task closed. No malware.

Post by morpheus747 » 28 Jan 2022, 07:44

mikeyww wrote:
28 Jan 2022, 07:37
Welcome to this AutoHotkey forum!

Running many scripts at the same time can lead to problems when the scripts conflict with each other. Without seeing the scripts, more specific guidance is a challenge!

Taskkill could help you if needed.
Thanks a lot for the reply.
I will have a look at TASKKILL again, but its not really an issue with multiple scripts, since it also happen when I run this simple, single mouse poisition/coordinates script:

----

Code: Select all

#Persistent
SetTimer, ÜberwacheZeiger, 100
return

ÜberwacheZeiger:
MouseGetPos, xpos, ypos 
ToolTip, X%xpos% Y%ypos%
return
[Mod edit: [code][/code] tags added.]
----

User avatar
mikeyww
Posts: 26972
Joined: 09 Sep 2014, 18:38

Re: AHK still running in Background. Task closed. No malware.

Post by mikeyww » 28 Jan 2022, 08:06

That script itself does not move any windows, so I would not think that it, by itself, is the cause of your issue. Look in Windows Task Manager to see whether other conflicting programs or scripts may be running.

morpheus747
Posts: 3
Joined: 28 Jan 2022, 03:56

Re: AHK still running in Background. Task closed. No malware.

Post by morpheus747 » 28 Jan 2022, 12:23

No Mike, I am aware of that.
It seems like I have been giving too much information upfront and have been setting up for confusion.
Let's simple it down and start with the problem it self:

Once I close the AHK task via the task bar on the lower right of the desktop or the task manager (End process - or Exit), what else could be running somewhere?
It is clear that AHK is not completely shut down. Otherwise I would not run in trouble downstream.

Is there something in registry or anywhere else as well?
I have spend endless time going through the task manager over and over again.
There really is only one task that could be closed or is named something like AHK.

AHK is only 100% shut down, once I have restarted my PC. So some part of the program still runs even when its stopped or I exited out of it.
Thanks

gregster
Posts: 9035
Joined: 30 Sep 2013, 06:48

Re: AHK still running in Background. Task closed. No malware.

Post by gregster » 28 Jan 2022, 12:26

As soon as you close all autohotkey processes (with the script shown above you should have only one, if you don't start multiple instances of it), there is simply nothing left to run.
What you describe doesn't sound like AHK is your problem, especially if the problem also occurs when you run your simple script above - which doesn't even move windows.

But obviously you run other scripts or progams than you have shown here: "arranged like a cascade" Edit: I guess the windows are arranged like a cascade :) - this sounds like you might be missing something. Edit: Anyway, you are running a number of scripts...
Last edited by gregster on 28 Jan 2022, 12:56, edited 1 time in total.
Reason: edit

User avatar
mikeyww
Posts: 26972
Joined: 09 Sep 2014, 18:38

Re: AHK still running in Background. Task closed. No malware.

Post by mikeyww » 28 Jan 2022, 12:40

I agree. In Task Manager, an uncompiled script will appear as AutoHotkey.exe. A compiled script will appear by its compiled name.

If a script sends a key down and then exits, then the key may remain down (I think). Otherwise, I am not aware of persistent effects.

gregster
Posts: 9035
Joined: 30 Sep 2013, 06:48

Re: AHK still running in Background. Task closed. No malware.

Post by gregster » 28 Jan 2022, 12:47

mikeyww wrote:
28 Jan 2022, 12:40
If a script sends a key down and then exits, then the key may remain down (I think). Otherwise, I am not aware of persistent effects.
Sure, this can happen. It can usually be solved by pressing and releasing that key manually, if you know the key (or trial and error). No restart needed.
But the example script doesn't send anything; and it doesn't change the registry, doesn't run other programs, or something similar.

But your original description sounds like you might be sending keys to chrome windows. That could surely cause problems (as long as these scripts are actually running), if not timed or targeted correctly.
If you are, for example, trying to automate some financial or crypto orders, you should look instead for corresponding web APIs of the respective trading websites. This would be much more reliable.

Post Reply

Return to “Ask for Help (v1)”