$popup=[Native41]::Top([uint32]$l.pid,'Roster saved')
$null=[Native41]::SetForegroundWindow($popup);Start-Sleep -Milliseconds 150
if([Native41]::GetForegroundWindow() -ne $popup){throw 'Owned save popup not foreground'}
[Native41]::keybd_event(13,0,0,[UIntPtr]::Zero);[Native41]::keybd_event(13,0,2,[UIntPtr]::Zero)
Start-Sleep -Milliseconds 500
$captions=@([Native41]::Children($main)|ForEach-Object{[Native41]::Title($_)}|Where-Object{$_ -match 'Saved revision'})
$null=[Native41]::PostMessage($main,16,[IntPtr]::Zero,[IntPtr]::Zero)
$null=$p.WaitForExit(2500)
if(!$p.HasExited){throw 'Owned saved editor did not close after physical popup acknowledgment'}
@{pid=$l.pid;utc=[DateTime]::UtcNow.ToString('o');closedNormally=$true;savedCaption=$captions;sourceSha256=(Get-FileHash "$r\roster-editor41e\Studio.ROS").Hash;sourceCompanionSha256=(Get-FileHash "$r\roster-editor41e\Studio.ROS.openhoops.json").Hash}|ConvertTo-Json -Depth 4|Set-Content "$o\ui-close2.json"
