如何自动打开桌面布局?

如何自动打开桌面布局?

每天我都会打开一堆程序,然后按照最适合我的方式重新排列它们。然后我就开始工作。我有两个显示器,我目前使用的应用程序是 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

相关内容