How to prevent multiple instances of external application

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
shepherd
Posts: 3
Joined: 02 Apr 2019, 09:26

How to prevent multiple instances of external application

02 Apr 2019, 09:40

How can I ensure that when I run an external application from an AHK script, that it only runs one instance?

Background: I have a program on my PC called eSignal. If I double click a file with .ach extension it will open eSignal. Under windows XP it would only open one instance no matter how many times I double clicked it. Unfortunately, under windows 7, it opens a new instance each time.

I would like to use AHK to reproduce the XP behaviour under windows 7 if possible.

Sorry if I've explained this badly but I'm fairly new to this. Any pointers would be appreciated.
User avatar
sinkfaze
Posts: 616
Joined: 01 Oct 2013, 08:01

Re: How to prevent multiple instances of external application

02 Apr 2019, 10:28

I don't have the ability to build a testable script for this at the moment, but here are a couple of good starting points:

How to detect a double-click ??
Explorer: get name of file under cursor
shepherd
Posts: 3
Joined: 02 Apr 2019, 09:26

Re: How to prevent multiple instances of external application

02 Apr 2019, 10:43

Thanks sinkfaze.

To clarify, I want a script that will open multiple .ahk files under just one instance of eSignal. Currently I have a script that will open multiple .ahk files but every time a new instance of eSignal is opened, which is no good.
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: How to prevent multiple instances of external application

02 Apr 2019, 12:55

Have you checked to make sure that it's not a setting in eSignal that you previously had enabled on your XP system but have neglected to re-enable since installing it on Windows 7? Some applications (like Notepad++) have a "single instance" setting so that you can toggle that behavior.
Last edited by Osprey on 02 Apr 2019, 13:18, edited 1 time in total.
shepherd
Posts: 3
Joined: 02 Apr 2019, 09:26

Re: How to prevent multiple instances of external application

02 Apr 2019, 13:16

Thanks Osprey. I looked for that but couldn't find anything. eSignal technical support knew nothing about it either.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: peter_ahk and 354 guests