Reputation: 193
I've seen many scripts that resize windows applications, but none worked with modern apps. I'd think it would be really simple, but, somehow it doesn't recognize send or sendinput. My problem case example is:
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
Upvotes: 1
Views: 273
Reputation: 193
After trying out the tips in the comments, I debugged the error until I realize that Left
was not being interpreted as the Left Arrow (even though it says so in the help of AutoHotkey).
Replacing Left
with NumpadLeft
solved it.
No UIAccess needed in this case.
Sample:
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!
Upvotes: 2
Reputation: 1460
You may need your script to have 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).
Upvotes: 0