Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
模拟按下windows键的powershell代码是什么?_Powershell_Keypress_Windows Key - Fatal编程技术网

模拟按下windows键的powershell代码是什么?

模拟按下windows键的powershell代码是什么?,powershell,keypress,windows-key,Powershell,Keypress,Windows Key,我正在尝试制作一个.ps1程序来自动刷新edge中的站点,我还希望它能够定位窗口。我需要它来模拟按Win+RIGHT,但我找不到windows键的代码 $wshell.SendKeys('{??????}') 就个人而言,如果我是你,我会使用powershell模块来完成这项任务。如果下载zip文件,则需要将zip文件中的目录“install\AutoitX”解压缩到计算机上的某个位置。当然,在执行此操作之前,请确保解除对zip文件的阻止。然后,导入autoit powershell模块,您可

我正在尝试制作一个.ps1程序来自动刷新edge中的站点,我还希望它能够定位窗口。我需要它来模拟按Win+RIGHT,但我找不到windows键的代码

$wshell.SendKeys('{??????}')

就个人而言,如果我是你,我会使用powershell模块来完成这项任务。如果下载zip文件,则需要将zip文件中的目录“install\AutoitX”解压缩到计算机上的某个位置。当然,在执行此操作之前,请确保解除对zip文件的阻止。然后,导入autoit powershell模块,您可以按您提到的键发送模拟,代码如下:

Initialize-AU3
Send-AU3Key -Key "#{RIGHT}" -Mode 0

与Windows密钥的SendKeys一起使用的密钥绑定如下:

# Activating the Windows Key
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.SendKeys]::SendWait('^{ESC}')