Skip to content

Commit

Permalink
corrected spelling mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSchoenburg committed Mar 24, 2022
1 parent db6cde0 commit c9bdddc
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions New-PushMon.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ param (
[Parameter(
Mandatory = $true
)]
[ValidateSet('ColorAtPos')]
[ValidateSet('CursorAtPos')]
[string]
$Method = 'ColorAtPos',
$Method = 'CursorAtPos',

[Parameter(
Mandatory = $true
Expand Down Expand Up @@ -241,15 +241,14 @@ Your specified user key = $( $UserKey )
"

switch ($Method) {
'ColorAtPos' {
'CursorAtPos' {
Write-Host "Hover over the position with your mouse and press any key to monitor it..."
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
$x, $y = Get-MousePosition
$InitialColor = Get-ScreenColor -X $x -Y $y

# Monitoring
do {
Clear-Host
Write-Host "Mouse position = x: $( $x ) y: $( $y )"
Write-Host "Initial color = $( $InitialColor )"
Write-Host 'Monitoring Color...'
Expand All @@ -263,14 +262,14 @@ switch ($Method) {

# This is the notification data, which gets converted to JSON
$body = @{
"token"=$ApiToken
"user"=$UserKey
"message"="The color at the given screen position has changed."
"token" = $ApiToken
"user" = $UserKey
"message" = "The color at the given screen position has changed."
} | ConvertTo-Json

# This header tells we're passing a JSON payload
$header = @{
"Content-Type"="application/json"
"Content-Type" = "application/json"
}

# Notify17 invocation
Expand Down

0 comments on commit c9bdddc

Please sign in to comment.