如何使用 autohotkey 调整现代 windows 应用程序的大小
How to resize a modern windows app with autohotkey
我见过许多调整 windows 应用程序大小的脚本,但 none 可以与现代应用程序一起使用。
我认为它会非常简单,但是,不知何故它无法识别发送或发送输入。
我的问题案例示例是:
1 Launch app/document associated with a modern app,such as Reader
2 Use windows+left arrow to "dock" app to the side.
3 Launch another app/application
您可能需要您的脚本具有 UIAccess
A number of security changes have been implemented in Windows 8 which prevent programs which are not Metro apps from injecting keys that would remove you from the Metro environment. The way this works is that the keyboard shortcut is ignored if it doesn't come from a physical keyboard or a program that has the appropriate permissions. [...] In order to have the proper permissions, the program must be built with UIAccess (see http://msdn.microsoft.com/en-us/library/ms742884.aspx).
尝试了评论中的提示后,我调试了错误,直到我意识到 Left
没有被解释为 左箭头 (尽管它在 AutoHotkey) 的帮助下这么说。
用NumpadLeft
替换Left
解决了。
在这种情况下不需要 UIAccess。
样本:
RunWait "D:\Temp\TranslationSource.pdf" ; opens Windows 8.1 Reader
Send #{NumpadLeft} ; docks it to the left
Send !{Tab} ; docks Desktop on the other half of the screen
RunWait "D:\Temp\TranslationTarget.txt" ; opens editor
Send #{NumpadUp} ; maximizes editor
; basic translation workspace setup done!
我见过许多调整 windows 应用程序大小的脚本,但 none 可以与现代应用程序一起使用。 我认为它会非常简单,但是,不知何故它无法识别发送或发送输入。 我的问题案例示例是:
1 Launch app/document associated with a modern app,such as Reader
2 Use windows+left arrow to "dock" app to the side.
3 Launch another app/application
您可能需要您的脚本具有 UIAccess
A number of security changes have been implemented in Windows 8 which prevent programs which are not Metro apps from injecting keys that would remove you from the Metro environment. The way this works is that the keyboard shortcut is ignored if it doesn't come from a physical keyboard or a program that has the appropriate permissions. [...] In order to have the proper permissions, the program must be built with UIAccess (see http://msdn.microsoft.com/en-us/library/ms742884.aspx).
尝试了评论中的提示后,我调试了错误,直到我意识到 Left
没有被解释为 左箭头 (尽管它在 AutoHotkey) 的帮助下这么说。
用NumpadLeft
替换Left
解决了。
在这种情况下不需要 UIAccess。
样本:
RunWait "D:\Temp\TranslationSource.pdf" ; opens Windows 8.1 Reader
Send #{NumpadLeft} ; docks it to the left
Send !{Tab} ; docks Desktop on the other half of the screen
RunWait "D:\Temp\TranslationTarget.txt" ; opens editor
Send #{NumpadUp} ; maximizes editor
; basic translation workspace setup done!