{ "name": "Check if application is running, launch it if not", "language": 0, "code": "using System;\r\nusing System.Drawing;\r\n\r\npublic static class DisplayFusionFunction\r\n{\r\n\tpublic static void Run(IntPtr windowHandle)\r\n\t{\r\n // Set the process name here (leave the asterisk at the start)\r\n string processName = \"*ts3client_win64.exe\";\r\n \r\n // Set the full path to the process here\r\n string processFullPath = @\"D:\\APPS\\TSClient\\ts3client_win64.exe\";\r\n\t\t\r\n\t\t// Check if the app is running\r\n\t\tbool isAppRunning = BFS.Application.IsAppRunningByFile(processName);\r\n\t\tif (isAppRunning)\r\n\t\t{\r\n // If it's already running, show a message\r\n BFS.Dialog.ShowMessageInfo(\"App is already running\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n // If it's not, then launch it\r\n BFS.Application.Start(processFullPath, \"\");\r\n\t\t}\r\n\t}\r\n}", "description": "This script will check if the specified process is already running and if not, it will launch it.", "references": "System.Core.dll|System.Data.dll|System.dll|System.Drawing.dll|System.Management.dll|System.Web.dll|System.Windows.Forms.dll|System.Xml.dll" }