1 回答

TA貢獻(xiàn)1790條經(jīng)驗 獲得超9個贊
在 Windows 10 中,計算器是一個 UWP 應(yīng)用,因此您需要使用不同的方法來找到它。
以下是FlaUI如何獲取新計算器與舊計算器的示例。FlaUI 是在托管 UIAv2 API 和非托管 UIAv3 COM 包裝器之上編寫的。
protected override Application StartApplication()
{
if (OperatingSystem.IsWindows10())
{
// Use the store application on those systems
return Application.LaunchStoreApp("Microsoft.WindowsCalculator_8wekyb3d8bbwe!App");
}
if (OperatingSystem.IsWindowsServer2016())
{
// The calc.exe on this system is just a stub which launches win32calc.exe
return Application.Launch("win32calc.exe");
}
return Application.Launch("calc.exe");
}
- 1 回答
- 0 關(guān)注
- 571 瀏覽
添加回答
舉報