![]() Write-Host "$timeLeft seconds left till alarm rings" $timespan = New-TimeSpan -Start $datetimeNow -End $datetimeRingįor ($i -eq 0 $i -le $timespan.TotalSeconds-1 $i++) # -1 to handle 0 seconds left on timespan $datetimeRing = "$(Get-Date -Format dd/MM/yyyy)" + " " + $time.ToString() $datetimeNow= Get-Date -Format "dd/MM/yyyy HH:mm:ss" $stopAlarm = ::Show('Stop sound?','Alarm!','YesNo','Warning') } -ArgumentList $timesAlarmToPlay | Out-Null $timesAlarmToPlay = 30 #times to repeat beep ![]() ![]() The usage can be found on the gif below.Īdd-Type -AssemblyName PresentationFramework #messagebox requirement To have the script somewhat presented in a good state I put it as an answer while it's clearly not an answer but a mere workaround to your requirements.Ĭopy and paste it to a text file and save it with a.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |