Bug with replication of script when reload

Report problems with documented functionality
User avatar
BriHecato
Posts: 124
Joined: 18 Jul 2017, 07:17

Bug with replication of script when reload

22 Aug 2017, 07:26

I've come across strange bug with my scripts.

I use escape as a reload key, and it's global windows setting for all scripts - so whenewer i hit escape to break any activity or command (in any app) scripts reload.
In my sripts I'm forcing single instance.
But something happen for the third time

How can you explain something like this :
2017-08-22H12_27_31-.png
2017-08-22H12_27_31-.png (46.29 KiB) Viewed 1996 times
2017-08-22H12_28_33-.png
2017-08-22H12_28_33-.png (85.84 KiB) Viewed 1996 times
2017-08-22H12_32_26-Menedżer zadań.png
2017-08-22H12_32_26-Menedżer zadań.png (61.55 KiB) Viewed 1996 times
ALMOST 600 processes are replicated one script

When this error appear I cannot even display info window of my script.
There's only one conclusion - scripts replicate when reloading after one error.
pneumatic
Posts: 338
Joined: 05 Dec 2016, 01:51

Re: Bug with replication of script when reload

22 Aug 2017, 20:06

I had a similar issue.

https://autohotkey.com/boards/viewtopic.php?f=5&t=34595

In my case it "could not close previous instance" because of Window's UAC/secpol which blocks programs from closing other programs if they have a lower integrity level.

To do anything reliably in windows seems to require running as admin. That's just how retarded Windows is, it's not really AHK's fault. Microsoft security policy says something like "if you're logged in as an administrator, you still receive all the security restrictions of regular Users, because "deny" takes precedence of "allow" and somehow propagates to Administrators since Administrators are part of the group of "Users".

If you want to run your script silently as admin on windows startup see here

https://autohotkey.com/boards/viewtopic ... 00#p159700

If you want extra reliability and completely free of "run as admin" nag screens, turn off UAC altogether. But even if you don't turn off UAC, you won't get the "run as admin" nag screen more than once because new instances should automatically and silently inherit admin privileges from the first instance.

But I run my scripts as .exe (not compiled, just put the autohotkey.exe into the same directory as your .ahk file and rename it to the same name as your ahk file, and run the .exe) maybe that affects things as well.
User avatar
BriHecato
Posts: 124
Joined: 18 Jul 2017, 07:17

Re: Bug with replication of script when reload

27 Aug 2017, 12:17

I handle it changing "reload key" from Escape to Capslock. I almost never used it anyway. Escape was in veeery often use. Maybe that's why Windows10 gone mad
User avatar
BriHecato
Posts: 124
Joined: 18 Jul 2017, 07:17

Re: Bug with replication of script when reload

11 Sep 2017, 02:28

Bug still happens on Win7 with capslock as a reload key
pneumatic
Posts: 338
Joined: 05 Dec 2016, 01:51

Re: Bug with replication of script when reload

26 Sep 2017, 01:18

Possibly related , https://autohotkey.com/boards/viewtopic ... 14&t=37510
Doesn't look like you are renaming the window though, so probably not.
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: Bug with replication of script when reload

26 Nov 2017, 22:59

Without any indication of your script's contents, I can only assume that the bug exists within your script, not AutoHotkey. I have only ever seen this effect caused by the script calling Run to launch itself.
User avatar
BriHecato
Posts: 124
Joined: 18 Jul 2017, 07:17

Re: Bug with replication of script when reload

06 Apr 2018, 02:00

About my scripts.
1. global remapping mouse keys + chordings to simple commands (like copy, paste, print..)
2. additional mapping for some keys bound to application - sending more complex command (like double and triple click in autocad invoking move rotate trim extend commands)
3. functions working with my company ERP that perform: move in a grid, pickup strings, read controls and title bar, trim and combine multiple strings into paths and filenames with wildcards, searching in background for those files, copying files, finally linking files into EPR interface.

I'm thinking that all errors I've encountered are connected to file handling - and happens when acessing to server which can be overload in that moment of time (it's company setup with soft-hardware bridge with pings 3-4ms and 300+ Mbps symmetrical ineternet connection ..... but it's placed in in other city 30km away from my office).

Thought that SingleInstance would overwatch it and recognize even hunged script.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 24 guests