Reputation: 655
I can run all of my programs with AutoHotkey, but I'm trying to open them all in specific locations on my 3 monitors. I played with some code but couldn't get it to change at all. This is what I have so far for one of my folders that I'm trying to open with this hotkey:
Run, C:\Python\LPTHW
WinActivate
WinMove A,, 10, 10, A_ScreenWidth-20, A_ScreenHeight-20
I got this code partially from another forum and I only kind of understand what it does, but modifying the numbers doesn't change anything about how it opens, and every once in a while it makes all my desktop icons disappear when I run it.
Upvotes: 1
Views: 798
Reputation: 688
Couple things you should probably know. The A
tells WinMove to move the active window. It's best to call out specifically what you're trying to move. And, the Width and Height parameters need to be forced as expressions. Take a look and see if you can alter your code to work based on the notepad example below.
Run, notepad
WinWaitActive, Untitled - Notepad
WinMove, Untitled - Notepad,, 0, 0, % A_ScreenWidth/2, % A_ScreenHeight/2
Upvotes: 1