简体   繁体   中英

Windows10 Powershell - Alarm, World Clock, Timer, Stopwatch?

Windows 10 has a decent little Application that lets you set multiple Alarms, World Clocks, Timers and Stopwatches.

Powershell also has some Stopwatch functionality; for instance like this:

$sw = [system.diagnostics.stopwatch]::startNew()

But I was disappointed to see that the two things aren't the same thing.

Is there a Powershell way of setting up a (say) a Timer for (say) 30 Minutes that will show up in the 'Timer' tab of the UI ? And therefore also let you watch the timer fullscreen, hear an alarm when it's finished etc ?

EDIT: This is the Application / UI I mean:

闹钟和时钟

Unless the Alarm & Clock application has an API or startup parameters of some kind, what you're asking for is not possible. You'd have to write your own application.

This answer from SuperUser says that two registry entries contain JSON files which define what the timers or alarms are. Your best bet would be to reverse engineer and modify those JSON settings and then restart or refresh the Alarm & Clock app somehow.

对我来说,它是这样工作的:

Start-Process -FilePath explorer -ArgumentList shell:Appsfolder\Microsoft.WindowsAlarms_8wekyb3d8bbwe!App

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM