Multiple instances of the same script .. wont work any longer Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Jovannb
Posts: 268
Joined: 17 Jun 2014, 02:44
Location: Austria

Multiple instances of the same script .. wont work any longer

Post by Jovannb » 17 Apr 2021, 02:32

Hi

I've one (A) script which calls another one (Sccript (B) with different start parameter). Everything worked well for years, multiple instances of (B) where there (some kind of messaging app with GUI's), no issue.
Now I changed (B) to another type of data gathering (from .accdb-File-Access to MySQL-Query).

As of now, (A) starts (B) with parameterset XYZ, later (A) starts (B) with parameterset ABC, then the first instance of (B) with YXZ gets killed and its GUI diappears - it is impossible to run more then one process of (B) simultaneously.

In that (B) there ist

Code: Select all

#singleinstance off
at top, I tried

Code: Select all

#Singleinstance, off
same issue.

I tried to replace my script (B) by

Code: Select all

#SingleInstance Off	
mypid:=DllCall("GetCurrentProcessId")
msgbox, ,%mypid%, %a_now%
return
works well. That original (B) script has 500 lines, too many to post.

How about that ?
AHK: 1.1.37.01 Ansi, 32-Bit; Win10 22H2 64 bit, german
Rohwedder
Posts: 7630
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Multiple instances of the same script .. wont work any longer

Post by Rohwedder » 17 Apr 2021, 03:44

Hallo,
I have no idea about "from .accdb-File-Access to MySQL-Query"
but AHK: Ansi, 32-bit! Is that still allowed?
User avatar
Jovannb
Posts: 268
Joined: 17 Jun 2014, 02:44
Location: Austria

Re: Multiple instances of the same script .. wont work any longer

Post by Jovannb » 17 Apr 2021, 03:52

inbetween I found, that I do have the same issue with former (unchanged) release of my script (B) as well.
Is it imaginable that there is a relation with latest Windows Update (now on Win10 20H2(Build 19042.928) ??
AHK: 1.1.37.01 Ansi, 32-Bit; Win10 22H2 64 bit, german
User avatar
Jovannb
Posts: 268
Joined: 17 Jun 2014, 02:44
Location: Austria

Re: Multiple instances of the same script .. wont work any longer  Topic is solved

Post by Jovannb » 17 Apr 2021, 04:20

Hi

@Rohwedder: therewith I mean, that my B-Script reads all it's data from an .accdb-file and now, because of the situation that many of us are in homeoffice (because of Covid), thats f... slow over VPN. Now I changed that all from .accdb-Files as databas to an MySQL-Server system which is app 20 times faster than that .accdb-file based database.

The issue with that apprently not working directive

Code: Select all

#singleinstance off
is/was a failure in an included ahk-library file. Script B works, but one instance at a time only. Now I excluded that (dismissed

Code: Select all

#incude nixisifx.ahk
) an now my script B is callable with mutliple instances.

J.B.
AHK: 1.1.37.01 Ansi, 32-Bit; Win10 22H2 64 bit, german
Post Reply

Return to “Ask for Help (v1)”