Use of IsAppRunning - Forum

Forum Navigation
You need to log in to create posts and topics.

Use of IsAppRunning

I have not used IsAppRunning in the past, but I want my application to check to see if I am trying to run my application a second time.

I placed it in Startup section at the very top with the option to continue or stop the app from running.

To test it, I started my older version of the app.  Then ran the app from the development.

It seemed to work great.  So I put it into use after compiling.

When I run the program, it detects my app is running.  But it should allow me to continue without showing me options because I am only running one.

Is there a way to accomplish this?

@cssystems

I have not used IsAppRunning in the past, but I want my application to check to see if I am trying to run my application a second time.
I placed it in Startup section at the very top with the option to continue or stop the app from running.
Is there a way to accomplish this?

Check out the section labelled "Prevent multiple copies of this publication from running at the same time:" over here ... https://winhelp.visualneo.com/Access.html

When I run the program, it detects my app is running. But it should allow me to continue without showing me options because I am only running one.

Perhaps you can post the code in the StartUp section of your pub (that relates to this functionality).

The Code I used:

IsAppRunning "[PubDir]iSalute.exe" "[RunningYN]"
If "[RunningYN]" "=" "True"
AlertBox "App Running" "iSalute is already running."
Exit "Exit this app" "Please Stop this attempt to run."
EndIf

I will look at other link soon.

Not sure where I should call the subroutine CommandLine_onchange.

@cssystems

When I run the program, it detects my app is running. But it should allow me to continue without showing me options because I am only running one.
Is there a way to accomplish this?

If I understand you correctly, when you say "continue without showing me options", you are referring to the confirmation box that is generated by your Exit command ... if so, try

Exit "" ""

.. on this Help page ... https://winhelp.visualneo.com/MessagesInteraction.html#EXIT ... it says "Leave the title and message fields blank to exit immediately without requesting confirmation"

Not sure where I should call the subroutine CommandLine_onchange.

You do NOT need to Call this subroutine ... a subroutine with this special name is automatically called ... for more detailed info, read this Help page ... https://winhelp.visualneo.com/Access.html ... in particular, the section titled "Prevent multiple copies of this publication from running at the same time:"

Open chat
1
Do you need more info?
Hi, do you have any doubt?