sysutils.isinstance(id)

Checks if an application instance is already running, using the provided identifier.

Parameters

id

A unique string that identifies the application.

Return value

Returns a boolean value indicating if the current application is already running, using the provided identifier.

Example

local sysutils = require "sysutils" -- Try to run this script in two different console -- Check if an instance of 'my app' is already running if sysutils.isinstance("my app") then print("An instance of 'my app' application is already running") else print("First instance of 'my app' application") end -- wait for 10sec sleep(10000)