 		return 0
 	fTemp := (ErrorLevel & 0xFFFF) + 1
 	GuiControl, PrgLnch: Choose, %batchPrgStatusHwnd%, %fTemp%
+
+	ControlGet, strTemp, List,,,ahk_id %batchPrgStatusHwnd%
+	Loop, Parse, strTemp, `n
+	if (A_Index == fTemp)
+	{
+		if (A_LoopField != "Active")
+		return
+	break
+	}
+
 	; create a different thread with "slow".
 	callback := RegisterCallback("DisplayActiveWindowProps", , 1)
 	DllCall(callback, "int", fTemp)

			lnchPrgIndex := -selPrgChoice
			lnchStat := -1
			}

		}

	; save to old
	CopyToFromRes(targMonitorNum, 1, -1)

	}

;init status list vars

		targMonitorNum := PrgLnchOpt.GetPrgMonToRn(-lnchPrgIndex)
		}
	; save current res to def
	CurrResStore(targMonitorNum,, lnchPrgIndex)
	lnchStat := 1

	strRetVal := LnchPrgOff(batchPrgStatus, lnchStat, temp, PrgLnkInf, PrgResolveShortcut, currBatchno, lnchPrgIndex, PrgCmdLine, iDevNumArray, PrgMonPID, PrgRnMinMax, PrgRnPriority, borderToggle, targMonitorNum, PrgPID, PrgListPID%btchPrgPresetSel%, btchPowerNames[btchPrgPresetSel])
