Skip to content

Commit

Permalink
Merge pull request #38 from theohbrothers/fix/fix-variables-for-set-s…
Browse files Browse the repository at this point in the history
…trictmode-latest

Fix: Fix variables for Set-StrictMode -Latest
  • Loading branch information
leojonathanoh authored May 30, 2021
2 parents 1ed7725 + 57d8a99 commit e3e05ac
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ function Position-ExplorerWindow {
# The returned screen objects appears to be in order of the physical position of the monitors, from left to right,
# regardless of what the monitor's ID in Control Panel's / Settings 'Identify' feature shows.
if (Add-Type -AssemblyName System.Windows.Forms -PassThru) {
$screens = Get-AllScreens
$screens = @(
Get-AllScreens
)
}else {
throw "Failed to load assembly: System.Windows.Forms"
}
Expand Down Expand Up @@ -348,9 +350,6 @@ function Position-ExplorerWindow {
$success = Position-ResizeWindow -ProcessId $childPid -Left $windowPosition['left'] -Top $windowPosition['top'] -Width $windowPosition['width'] -Height $windowPosition['height']
if ($success) {
"`tSuccessfully repositioned and resized window." | Write-Verbose

# increment cursor
$i++
}else {
Write-Warning "Failed to reposition and resize window. The window is not movable or not resizable."
}
Expand Down

0 comments on commit e3e05ac

Please sign in to comment.