Skip to content

Instantly share code, notes, and snippets.

@midnightfreddie
Created December 24, 2016 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save midnightfreddie/0eca6ac29f54fb05da3395983152d7e8 to your computer and use it in GitHub Desktop.
Save midnightfreddie/0eca6ac29f54fb05da3395983152d7e8 to your computer and use it in GitHub Desktop.
The script I used to automate font and size testing on YouTube https://www.youtube.com/watch?v=T0oKmXYMnbc
###############################
### Font and size info here ###
###############################
9..32 | ForEach-Object {
$Size = $PSItem
"Lucida Console", "Consolas" | ForEach-Object {
$psISE.Options.FontSize = $Size
$psISE.Options.FontName = $PSItem
$psISE.CurrentPowerShellTab.Files.SelectedFile.Editor.SetCaretPosition(2,1)
$psISE.CurrentPowerShellTab.Files.SelectedFile.Editor.SelectCaretLine()
$psISE.CurrentPowerShellTab.Files.SelectedFile.Editor.InsertText( ("### {0} size {1} ###" -f $PSItem.PadLeft(15), $Size.ToString().PadLeft(2)) )
Start-Sleep -Seconds 2
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment