如何使Windows终端高于所有其他窗口? [重复]

时间:2022-07-03 15:53:37

This question already has an answer here:

这个问题在这里已有答案:

I do have a .bat script and at some point I want to make it active and ask user for input. Is it possible to make this window active and above any other window on my screen.

我有一个.bat脚本,在某些时候我想让它激活并询问用户输入。是否可以激活此窗口并高于屏幕上的任何其他窗口。

Powershell will also work for me.

Powershell也适合我。

Thank you

1 个解决方案

#1


1  

With Powershell you can prompt a Inputbox, which will be on top.

使用Powershell,您可以提示输入框,它将位于顶部。

[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')

[Microsoft.VisualBasic.Interaction]::InputBox("Message", "Tile", "Default answer")

[Microsoft.VisualBasic.Interaction] :: InputBox(“消息”,“平铺”,“默认答案”)

#1


1  

With Powershell you can prompt a Inputbox, which will be on top.

使用Powershell,您可以提示输入框,它将位于顶部。

[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')

[Microsoft.VisualBasic.Interaction]::InputBox("Message", "Tile", "Default answer")

[Microsoft.VisualBasic.Interaction] :: InputBox(“消息”,“平铺”,“默认答案”)