diff --git a/samy.ps1 b/samy.ps1 index 46bda2b..89907d6 100644 --- a/samy.ps1 +++ b/samy.ps1 @@ -792,6 +792,17 @@ $Global:SamyTasks | ForEach-Object { Write-LogHybrid "BAD TOOLTIP TYPE: Id=$($_.Id) Type=$($_.Tooltip.GetType().FullName) ValueCount=$(@($_.Tooltip).Count)" Warning UI -LogToEvent } } +Write-LogHybrid "Dumping tooltip lengths (to spot mega-tooltips)..." Info UI -LogToEvent + +$Global:SamyTasks | ForEach-Object { + $tip = if ($_.PSObject.Properties.Name -contains 'Tooltip') { [string]$_.Tooltip } else { "" } + $len = $tip.Length + + if ($len -gt 80) { + $preview = $tip.Substring(0, [Math]::Min(160, $len)) + Write-LogHybrid "LONG TOOLTIP: Id=$($_.Id) Len=$len Preview='$preview'" Warning UI -LogToEvent + } +} #endregion building the Menu