scripting access to window view

Is there some way to set the window view (“list”, “icons”, “columns”, “split”, “three\ panes”) via applescript? I can’t work out how. I am trying to create a script to set the exact arrangement and target of my windows the way I want it to, and it seems straightforward apart from this.

You could use system events and the View menu items or their shortcuts.

Thanks. After a bit of hairpulling (above what is normal with applescript), I did it using keystrokes.

As an aside, I’d love to have a chat with whoever thought that making applescript look like a natural language was a good idea.

You might want to try rb-appscript

Thanks. I don’t know Ruby, but I do know Python so py-appscript may be worth a try.