This question already has an answer here:
这个问题在这里已有答案:
- Keeping batch console on the screen as active window 1 answer
将批处理控制台保持在屏幕上作为活动窗口1回答
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(“消息”,“平铺”,“默认答案”)