Hi,
thanks for your fast response.
(i) the boxes work fine, as expected. Possibly, the order of the message and the title should be changed in one of them. Currently, I have to set InputBox(message,title) and MessageBox(title,message,mode) - if I'm not wrong.
(ii) using OpenDocument() and Currentdoc() for the first times seems to work. Removing the file from disk or running the script with another file gives an error, saying that the file is not available. Probably, it has something to do with not closing the file.
Please, check my coarse rest code:
@script("Test Document Handling")
def newdoc():
pn.OpenDocument("test.txt","j")
mydoc = scintilla.Scintilla(pn.CurrentDoc())
mydoc.AppendText(14,"Hello, World!\n")
mydoc.GotoPos(5)
For me the question arises how to save/close files/documents from within a script.
Is there any further sample code ?
I'm happy that I found an editor which seems to fit my needs and may be extended using python scripts. PSPAD has an andvanced Python interface, so I'm hoping that the PN2 scripting development goes in a similar direction.