Fix if/else logic for pattern choice
In addition, overwrite existing file.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
$outlook = New-Object -com Outlook.Application
|
||||
$inbox = $outlook.Session.GetDefaultFolder(6)
|
||||
$stream = [System.IO.StreamWriter] "d:\blink-new-mail-temp.txt"
|
||||
if ($inbox.UnReadItemCount -eq 0) { $stream.WriteLine("#000000") }
|
||||
$stream = New-Object 'System.IO.StreamWriter' -ArgumentList "d:\blink-new-mail-temp.txt", $false
|
||||
if ($inbox.UnReadItemCount -eq 0) {
|
||||
$stream.WriteLine("#000000")
|
||||
} else {
|
||||
$stream.WriteLine("pattern: ""NewMail""")
|
||||
}
|
||||
$stream.close()
|
||||
Reference in New Issue
Block a user