How to script popping out a new Screen?

I would like to do this in script:

  1. Pop out a new window, like how you can hold down shift and grab the corner piece of a window so that it pops out of Blender’s main window.
  2. Make that window a specific Scene. Manually, I’d go about this by changing the window to an Info type, then changing the Screen dropdown to the specific screen that I want.
  3. Resize that window to a specific width and height.
  4. Move that window to a specific spot on the monitor.

I’m not sure if #4 can be scripted, but I imagine steps 1-3 can. I’ve not been able to find any examples or documentation on how to do it though. Any ideas how to do this? Thanks!

  1. The operator is bpy.ops.screen.actionzone(modifier=1), but it poll-fails if called from Python (I assume either because of missing eventstate or actionzones in context).
  2. Generally, the scene can be set like bpy.context.screen.scene = bpy.data.scenes[‘Scene’]
  3. Blender’s Python API can’t resize regions/areas/windows, but there are certainly ways to change window size through OS API calls.
  4. Needs system API calls too.

Thanks, CoDEmanX. At least I know it’s not 100% doable through scripting. I’m going to stick with the solution that I came up with, which was to use AutoHotKey (a Windows-only scripting solution) to perform the mouse actions and API calls. I was hoping I could use an add-on and make a cross-platform solution, but oh well.