Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On a daily basis I open a bunch of programs and rearrange them the way that works best for me. I then get to work. I have two monitors and the apps I'm currently using are PuTTY(*2), pycharm, Winamp, Chrome, and Perforce.

How can I save - or program - the starting, positioning and sizing of these applications so I don't have to manually repeat it over and over again?

share|improve this question
    
I use autoit to start and arrange my windows, it has functions to automate opening them, moving them to the desired spot on screen and with the desired dimensions, even opening some minimized or maximized if desired. I have had issues getting it to re-size putty correctly though, it will open and move it fine. I also use it to log in to certain applications (like cisco agent desktop or web apps). Pay attention to the ShellExecute, Run, WinMove, WinSetState, WinWait, Send functions. –  MaQleod Sep 8 '11 at 4:35
    
The more I search the more apparent... there really doesn't appear to be any native windows-esque way to invoke such basic tasks?! Just apps of varying specificity and dubiousness. –  John Mee Sep 8 '11 at 5:52
    
Just added an answer with sample code to show you how it works. –  MaQleod Sep 8 '11 at 6:04
    
Autoit is a pretty well known program. I personally use AutoHotkey, but that shouldn't detract from Autoit's credibility. –  surfasb Sep 8 '11 at 11:01
    
AutoHotkey is actually a derived from AutoIt, they forked off the project a long while back. –  MaQleod Sep 8 '11 at 17:21

1 Answer 1

Here is a sample code using AutoIt that will start chrome and putty for you, relocate them, resize them, and when it opens putty it will auto login to an ssh server - it may not be exactly what you want, but it will give you the basic building blocks by which to fill in the rest:

$server = "xxx.xxx.xxx.xxx"
$username = "myusername"
$password = "mypassword"

ShellExecute(@userprofiledir & "\AppData\Local\Google\Chrome\Application\chrome.exe", "google.com") ;open chrome window to google.
WinWait("Google", "") ;waits for window to be open
WinMove("Google", "", 1, 1, 800, 600) ;moves window to 1x1 and then resizes it to 800x600
Run(@ComSpec & " /c " & '""C:\Program Files\PuTTY\putty.exe"" -ssh ' & $username & '@' & $server & ' -pw ' &  $password, "", @SW_HIDE) ;opens putty and logs into ssh server automatically
WinWait($server, "") ;waits for window to be open
WinMove($server, "", 801, 1, 600, 1000) ;moves window to 801x1 and resizes to 600x1000
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.