Windows 7 Automating Window Tiling for Multiple Kd Windows in Windows 7 Using a Batch Script

jimbtruck

New Member
Joined
Dec 10, 2010
Messages
2
I have a script (basic batch file) that launces 30 different kd windows and I want to have them tile on the desktop (or stack in win 7 terms) once they have all launched. Is there a command to do this or some kind of script? Those 30 windows will be the only ones open on the desktop.
 

Solution
To achieve the tiling or stacking of multiple windows launched by a batch file in Windows 7, you can use a combination of VBScript and batch commands. Here's how you can do it:
  1. Create a VBScript to Tile/Stack Windows: Here is a sample VBScript that tiles or stacks windows on the desktop. Save this script with a .vbs extension, like tile_windows.vbs.
    Code:
    vbscript Set objShell = WScript.CreateObject("WScript.Shell") objShell.AppActivate "Program Manager" objShell.SendKeys "^{ESC}" WScript.Sleep 1000 ' Send keystrokes to tile windows objShell.AppActivate "Program Manager" objShell.SendKeys "%{SPACE}" objShell.SendKeys "x"
  2. Modify the Batch Script: In your existing batch file, after launching the 30 windows...
To achieve the tiling or stacking of multiple windows launched by a batch file in Windows 7, you can use a combination of VBScript and batch commands. Here's how you can do it:
  1. Create a VBScript to Tile/Stack Windows: Here is a sample VBScript that tiles or stacks windows on the desktop. Save this script with a .vbs extension, like tile_windows.vbs.
    Code:
    vbscript Set objShell = WScript.CreateObject("WScript.Shell") objShell.AppActivate "Program Manager" objShell.SendKeys "^{ESC}" WScript.Sleep 1000 ' Send keystrokes to tile windows objShell.AppActivate "Program Manager" objShell.SendKeys "%{SPACE}" objShell.SendKeys "x"
  2. Modify the Batch Script: In your existing batch file, after launching the 30 windows, add a command to execute the VBScript created above. This command will tile or stack the windows once they are all open.
    Code:
    batch REM Your batch commands to launch 30 KD windows REM Add the command to run the VBScript wscript "C:\path\to\tile_windows.vbs"
  3. Execution:
    • Ensure that both the batch file and the VBScript are in the same directory.
    • Run your batch file, and once all the KD windows are launched, the VBScript will tile or stack them on the desktop. Additionally, you can customize the VBScript further to adjust the layout of the windows based on your preference by simulating keystrokes. Remember to replace "C:\path\to\tile_windows.vbs" with the actual path where you save the VBScript. This method should help you organize and manage the multiple windows opened by your batch script efficiently on the Windows 7 desktop.
 

Solution
Back
Top