gpt4 book ai didi

gridview - 脚本完成时如何防止关闭 GridView

转载 作者:行者123 更新时间:2023-12-04 09:43:58 27 4
gpt4 key购买 nike

我有一个使用 out-gridview 显示结果的脚本.这是一个简单的例子:

"hello world" | out-gridview

当我使用 Run with PowerShell 运行脚本时,它会打开 gridview 并在打开后立即关闭它。 (我认为这是因为 gridview 不是模态的并且脚本完成了。)

如何让 PowerShell 等到 gridview 被手动关闭?

最佳答案

怎么样:

"hello world" | out-gridview -wait

根据 the documentation of Out-GridView , 选项 -Wait阻止 Windows PowerShell 关闭,直到 Out-GridView 窗口关闭。

它在 Windows PowerShell 3.0 中可用。

关于gridview - 脚本完成时如何防止关闭 GridView ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2097904/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com