UDF: _EnforceSingleInstance() ;~ PUT IT AT THE TOP OF YOUR SCIPT ! Func _EnforceSingleInstance() Local $exeScriptName = @ScriptName If (@Compiled = 0) Then $exeScriptName = StringRegExpReplace(@AutoItExe, "^.*\\", "") Local $regKey = "HKEY_CURRENT_USER\SOFTWARE\TRONG_UDF\" & $exeScriptName, $regValue = "Last_PID" Local $regReturn = RegWrite($regKey, $regValue, "REG_SZ", @AutoItPID) If ($regReturn = 0) Then Exit Sleep(100) Local $L