{
	"robotiqProcessInfo": {
		"id": "",
		"organizationName": "",
		"organizationId": "",
		"name": "pero",
		"description": "",
		"author": "",
		"version": "",
		"createdOn": "",
		"lastModified": ""
	},
	"steps": [
		{
			"children": [
				{
					"stepType": "ScriptStep",
					"id": "2acfbfc5-4cef-7fd2-4375-36278c6ee27e",
					"expression": "[DllImport(\"user32.dll\")]\r\n[return: MarshalAs(UnmanagedType.Bool)]\r\nstatic extern bool SetForegroundWindow(IntPtr hWnd);\r\n\r\n\r\nvoid Main()\r\n{\r\n    string ffmpegFolderPath = (string)VR[\"ffmpegFolderPath\"];\r\n\r\n    string targetWindowTitle = System.IO.Path.Combine(ffmpegFolderPath,\"ffmpeg.exe\"); // Replace this with your specific CMD window title\r\n    Process[] processes = Process.GetProcessesByName(\"ffmpeg\");\r\n\r\n    foreach (Process process in processes)\r\n    {   //MessageBox.Show(process.MainWindowTitle);\r\n        if (process.MainWindowTitle == targetWindowTitle)\r\n        {\r\n            IntPtr hWnd = process.MainWindowHandle;\r\n            if (hWnd != IntPtr.Zero)\r\n            {\r\n                SetForegroundWindow(hWnd);\r\n                Thread.Sleep(1000);\r\n                SendKeys.SendWait(\"q\");\r\n                return;\r\n            }\r\n        }\r\n    }\r\n    \r\n    Console.WriteLine($\"CMD window with the specified title '{targetWindowTitle}' was not found.\");\r\n}\r\n\r\nMain();",
					"name": "Stop Video (FFMPEG)"
				},
				{
					"windowProcessInfo": {},
					"stepType": "PauseStep",
					"id": "20bd7747-c6db-6b5f-86b2-3cc6854d438d",
					"duration": "2000",
					"name": "2s"
				}
			],
			"stepType": "DefineFunction",
			"outParamNames": [],
			"paramNames": [
				{
					"name": "ffmpegFolderPath",
					"variableType": 3
				}
			],
			"functionName": "demo/StopVideoLog",
			"paramNames[0]": "ffmpegFolderPath",
			"paramNames[1]": "*configPath*",
			"paramNames[2]": "configExcelColumnName",
			"paramNames[3]": "configExcelRowIndex",
			"paramNames[4]": "configExcelSheetName",
			"name": "StopRecordingVideoLog",
			"id": "38734e1d-6c79-e3d9-3895-833d8b332617"
		}
	]
}