 	DllCall("SetCursorPos", "UInt", dx, "UInt", dy)
 	}
 
-
-
-}
-PrgAlreadyLaunched(SelIniChoicePath, PrgLnchMon, dispMonNames, regoVar)
-{
-temp := 0
-IniRead, temp, %SelIniChoicePath%, General, PrgAlreadyLaunchedMsg
+}
+
+PrgAlreadyLaunched(SelIniChoicePath, targMonitorNum, dispMonNames, regoVar)
+{
+retVal := 0
+IniRead, retVal, %SelIniChoicePath%, General, PrgAlreadyLaunchedMsg
 sleep, 120
 
-	if (temp)
-	{
-		if (temp == 1)
-		{
-			if (DefResNoMatchRes(SelIniChoicePath))
-			{
-			ChangeResolution(dispMonNames, regoVar, targMonitorNum)
-			sleep, 1000
-			}
-		}
-	}
-	else
-	{
-		MsgBox, 8195, , Batch has completed but a Prg has been launched via Test Run.`nIt's possible Batch Prgs used other monitors other than the default.`nDo you wish to change the resolution of the monitor `nPrgLnch was run from back to its default resolution now?`n`nReply:`nYes: Change resolution (Warn like this next time) `nNo: Change resolution (This will not show again) `nCancel: Do not change resolution (This will not show again)`n
-		IfMsgBox, Cancel
-		IniWrite, 2, %SelIniChoicePath%, General, PrgAlreadyLaunchedMsg
-		else
-		{
-				if (DefResNoMatchRes(SelIniChoicePath))
-				{
-				ChangeResolution(dispMonNames, regoVar, targMonitorNum)
-				sleep, 1000
-				}
-			IfMsgBox, No
-			IniWrite, 1, %SelIniChoicePath%, General, PrgAlreadyLaunchedMsg
-
+
+	if (!retVal)
+	{
+	retVal := TaskDialog("Screen Resolution for Test Run Prg", "Batch has completed and, in the same monitor,`na Prg has been launched with a click on Test Run.", , "The monitor resolution set for the Test Prg might not be the same as the current resolution.`nTest Prgs are generally recommended to run in Temporary mode so the default resolution is automatically restored on quitting PrgLnch`nDo you wish to change the resolution of the monitor the Test Prg was launched from?", , "Change resolution", "Do not change resolution")
+		if (retVal < 0)
+		{
+		retVal := -retVal
+		IniWrite, %retVal%, %SelIniChoicePath%, General, PrgAlreadyLaunchedMsg
+		}
+	}
+
+	if (retVal == 1)
+	{
+	PrgLnchOpt.scrWidth := PrgLnchOpt.scrWidthTest
+	PrgLnchOpt.scrWidth := PrgLnchOpt.scrHeightTest
+	PrgLnchOpt.scrWidth := PrgLnchOpt.scrFreqTest
+		if (DefResNoMatchRes(SelIniChoicePath))
+		{
+		ChangeResolution(dispMonNames, regoVar, targMonitorNum)
+		sleep, 1000
 		}
 	}
 

if (lnkInfo)
{
strRetVal := SubStr(strTemp, InStr(strTemp, "\",, -1) + 1)
strRetVal := SubStr(strRetVal, 1, StrLen(strRetVal)-3) . "exe" ; assume exe
}
else
strRetVal := SubStr(strTemp, InStr(strTemp, "\",, -1) + 1)

						}

					}
					case 2:
					{
						if (selPrgChoice)
						{
							if (selPrgChoice == 100) ;write record at init
							{
							spr := ""
								loop % dispMonNamesNo - 1
								{
								spr .= iDevNumArray[A_Index] . ","
								}
							spr .= iDevNumArray[dispMonNamesNo]

							IniWrite, %spr%, %SelIniChoicePath%, Prgs, PrgMon
							}

						}
						else  ;reading entire file
						{
							temp := 0
							if (k)
							{
								Loop, parse, k, CSV , %A_Space%%A_Tab%
								{
								iDevNumArrayIn[A_Index] := A_Loopfield
								temp++
								}

								if (iDevNumArrayIn[1])
								{
									if (temp == dispMonNamesNo)
									{
									loop % temp
									{
										if (iDevNumArray[A_Index] != iDevNumArrayIn[A_Index])
										{
										MsgBox, 8196, Different Monitors, % "Informational: The current monitor configuration differs to the one read in the ini file.`n`n`nYes: Continue to write the new configuration. `nNo: Quit Prglnch. `n"
											IfMsgBox, Yes
											Break
											else
											{
											KleenupPrgLnchFiles()
											ExitApp
											}
										}
									}
									}
									else
									{
									MsgBox, 8196, Different Monitors, % "Informational: The current monitor configuration differs to the one read in the ini file.`n`n`nYes: Continue to write the new configuration. `nNo: Quit Prglnch. `n"
										IfMsgBox, No
										{
										KleenupPrgLnchFiles()
										ExitApp
										}
									}
								}
								else ;  cannot handle old ini files
								{
									if (k < 111) ; 111 is case when driver is uninstalled and only one monitor!
									{
									sectCount -= 1
									reWriteIni := 1
									Continue
									}
									else
									{
									IniRead, foundpos, %SelIniChoicePath%, General, OnlyOneMonitor
										if (!foundpos)
										{
										MsgBox, 8196, One Monitor, % "No more than one logical monitor in Prglnch.ini!`nMost likely cause is driver removal.`nInformational only- if driver has just been updated.`n`n`nYes: Continue (Warn like this next time) `nNo: Continue (This will not show again) `n"
											IfMsgBox, No
											IniWrite, 1, %SelIniChoicePath%, General, OnlyOneMonitor
										}
									}
								}
							}
							else
							{
							sectCount -= 1
							reWriteIni := 1
							Continue
							}
						}
					}
					case 3:
					{
						if (!inputOnceOnly)
						{
							if (k)
							PrgBatchIniStartup := k
						}
					}
					case 4:
					{
						if (!inputOnceOnly)
						{
							if (k)
							PrgTermExit := k
						}
					}
					case 5:
					{
						if (!inputOnceOnly)
						{
							if (k)
							PrgIntervalLnch := k
						}
					}
					case 6:
					{
						if (!inputOnceOnly)
						{
							Loop, parse, k, CSV , %A_Space%%A_Tab%
							{
							PresetNames[A_Index] := A_Loopfield
							}
						}
					}
					default:
					{
						if (sectCount < 13)
						{
							if (!inputOnceOnly)
