I'm trying to open 4 separate chrome windows and then tile them on my screen when I double click a shortcut on my desktop.
this code works differently each time I run it. sometimes it works correctly, but more often it will only open 2 chrome windows and even then doesn't tile them on the screen.
I've created this as a SCRIPT1.VBS file on my C:\ drive and then created a shortcut to SCRIPT1.VBS on my desktop
Dim objShell
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
objShell.ShellExecute "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
objShell.ShellExecute "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
objShell.ShellExecute "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
objShell.TileVertically
set objShell = nothing`
I have also created a SCRIPT2.VBS FILE
Dim objShell
Set objShell = CreateObject("Shell.Application")
objAPP.shellexecute "chrome.exe","--new-window","","",1
objAPP.shellexecute "chrome.exe","--new-window","","",1
objAPP.shellexecute "chrome.exe","--new-window","","",1
objAPP.shellexecute "chrome.exe","--new-window","","",1
objShell.TileVertically
set objShell = nothing
Script2.vbs has the same random problems that script1.vbs has. sometimes it works, but more often it only opens 2 chrome windows and does not tile them.
Shell.Application.TileVerticallyonly applies to Explorer windows, not arbitrary apps like Chrome. I tried to do this with Powershell and it didn't work with Chrome. There is a Chrome plugin to show pages in a grid... I won't say its impossible but if the Win32 Move/Size Window APIs don't work with Chrome then you're left with hacky AutoHotKey scripts.