From a8c62151f37458a86da931bc39352b4964df7ca7 Mon Sep 17 00:00:00 2001 From: Pat Hartl Date: Thu, 30 Nov 2023 19:46:04 -0600 Subject: [PATCH] Fix snippets --- LANCommander/Snippets/Functions/Get-PrimaryDisplay.ps1 | 2 +- LANCommander/Snippets/Functions/Write-ReplaceContentInFile.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LANCommander/Snippets/Functions/Get-PrimaryDisplay.ps1 b/LANCommander/Snippets/Functions/Get-PrimaryDisplay.ps1 index 178b0e1..460e167 100644 --- a/LANCommander/Snippets/Functions/Get-PrimaryDisplay.ps1 +++ b/LANCommander/Snippets/Functions/Get-PrimaryDisplay.ps1 @@ -1,2 +1,2 @@ -# Bounds are accessible by $Display.Width and $Display.Height +# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height $Display = Get-PrimaryDisplay \ No newline at end of file diff --git a/LANCommander/Snippets/Functions/Write-ReplaceContentInFile.ps1 b/LANCommander/Snippets/Functions/Write-ReplaceContentInFile.ps1 index c28c8bf..f3e8faa 100644 --- a/LANCommander/Snippets/Functions/Write-ReplaceContentInFile.ps1 +++ b/LANCommander/Snippets/Functions/Write-ReplaceContentInFile.ps1 @@ -1,2 +1,2 @@ # Use regex to replace text within a file. Quotes are escaped by double quoting ("") -Write-ReplaceContentInFile -Regex '^game.setPlayerName "(.+)"' -Replacement "game.setPlayerName ""$NewName""" -FilePath "$InstallDir\" \ No newline at end of file +Write-ReplaceContentInFile -Pattern '^game.setPlayerName "(.+)"' -Substitution "game.setPlayerName ""$NewPlayerAlias""" -FilePath "$InstallDirectory\" \ No newline at end of file