In Parallels Desktop 8 or 9, I used an AppleScript to set the size of the window to a standard size (important for testing/documenting the GUI on a Windows app). When I create a screenshot, it needs to match the target resolution (e.g., 1366 x 768). To be clear, I'm not trying to size it to match my Apple monitors, but I am trying to emulate a Windows laptop with a much smaller screen. I need to resize the VM window to some exact sizes.
Just created a Windows 10 VM last night with Parallels Desktop 10 on Yosemite, and my trusty script failed. Acts as though the VM windows are not scriptable anymore. I get a "Can't get bounds of window" error (-1728). The Parallels Desktop Control Center window is sizable, but the VM window is not.
Is there another way to accomplish my goal of sizing the window to a particular size, without trial-n-error of screenshots and manual shrinking/expanding the size of the window?
Below is my script that used to work (and yes, I changed the title to "Windows 10").
set appWindow to "Parallels Desktop"
tell application "Parallels Desktop" to get the bounds of the window 1
tell application "Parallels Desktop"
set bounds of the window 1 to {1, 1, 1366, 768}
end tell
Just created a Windows 10 VM last night with Parallels Desktop 10 on Yosemite, and my trusty script failed. Acts as though the VM windows are not scriptable anymore. I get a "Can't get bounds of window" error (-1728). The Parallels Desktop Control Center window is sizable, but the VM window is not.
Is there another way to accomplish my goal of sizing the window to a particular size, without trial-n-error of screenshots and manual shrinking/expanding the size of the window?
Below is my script that used to work (and yes, I changed the title to "Windows 10").
set appWindow to "Parallels Desktop"
tell application "Parallels Desktop" to get the bounds of the window 1
tell application "Parallels Desktop"
set bounds of the window 1 to {1, 1, 1366, 768}
end tell