我每天都會打開一堆程序,並以最適合我的方式重新排列它們。然後我就開始工作。我有兩台顯示器,目前使用的應用程式是 PuTTY(*2)、pycharm、Winamp、Chrome 和 Perforce。
如何保存或編程這些應用程式的啟動、定位和大小調整,以便我不必一次又一次地手動重複?
答案1
這是使用的範例程式碼自動它這將為您啟動chrome 和putty,重新定位它們,調整它們的大小,當它打開putty 時,它將自動登錄到ssh 伺服器- 它可能不完全是您想要的,但它將為您提供基本的構建塊填寫其餘部分:
$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