teh*_*orf 27 mouse windows-7 keyboard-shortcuts macros
我在 Windows 7 上设置了三台显示器,有时我会忘记光标所在的位置。是否有任何 Windows 快捷方式来重置鼠标位置?我猜没有,但是有没有办法设置一个简单的宏,我可以绑定到一个组合键来将光标设置为默认位置,例如主显示器的中心?
Han*_*ood 29
结合上面的一些想法,我想出了这个脚本。它已经过测试并且可以正常工作。
中心光标.ps1
[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | out-null
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | out-null
$bounds = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds
$center = $bounds.Location
$center.X += $bounds.Width / 2
$center.Y += $bounds.Height / 2
[System.Windows.Forms.Cursor]::Position = $center
Run Code Online (Sandbox Code Playgroud)
将此脚本保存在一个方便的文件夹中,然后在“所有程序”菜单中创建一个快捷方式:
目标: %systemroot%\system32\windowspowershell\v1.0\powershell.exe -ExecutionPolicy RemoteSigned -File "C:\Path To Script\CentreCursor.ps1"
快捷键: Ctrl + Alt + Shift + C
运行:最小化
现在,每当您按Ctrl+ Alt+ Shift+ 时C,您的光标都会返回主页。
编辑: 虽然它似乎不是我的计算机的要求,但我已将 Patrick 的建议添加到快捷方式中。
Bri*_*ian 13
打开“按 CTRL 键时显示指针位置”是一种选择。如果应用程序当前将其更改为某些自定义鼠标指针,例如画笔,这将特别有用,因为它更难看到。

以下AutoHotkey命令序列将立即将鼠标移动到主显示器的中心:
CoordMode, Mouse, Screen
MouseMove, A_ScreenWidth/2, A_ScreenHeight/2, 0
Run Code Online (Sandbox Code Playgroud)
例如,编译以下脚本:
CoordMode, Mouse, Screen
MouseMove, A_ScreenWidth/2, A_ScreenHeight/2, 0
ExitApp
Run Code Online (Sandbox Code Playgroud)
然后,您可以.lnk使用您选择的快捷键创建一个快捷方式 ( ) 。:)
| 归档时间: |
|
| 查看次数: |
48099 次 |
| 最近记录: |