> How can I learn to "script" pythonwin?
>
> I'd like to start with a script that would open an existing .py file in
> an edit window, then do various things such as:
> set the window size and position
> scroll the text
> position the cursor
> size the "class" pane
> position the splitter
>
> Any pointers are welcome.
I'm afraid you need to learn MFC. To get started, try something like:
>>> import win32ui
>>> app = win32ui.GetApp()
>>> o=app.OpenDocumentFile("c:\\whatever\\filename")
>>> o
<pywin.framework.editor.color.coloreditor.SyntEditDocument instance at
0x0129EFD0>
>>>
o.GetEditorView().GetParent().GetParent().GetParent().MoveWindow((0,0,10,10)
)
Obviously lots of GetParent() calls - in the real world you would loop until
you hit a frame window.
Hope this helps,
Mark
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32