paste text in a new tab

19 views
Skip to first unread message

Amir Sabbagh

unread,
Apr 19, 2013, 10:35:27 AM4/19/13
to scite-interest
Hi all,
I am trying to write a script that takes some text from a buffer and paste it to a new tab.
the text extraction part is fine, but I can not figure how to open a new tab and paste the text there.

so far I am trying with:

#creating in advance a file
io.open ("Ciro.txt" ,"a+")

#opening it in Scite
scite.Open("Ciro.txt")

#for some reason the UndoAction does not work
editor:BeginUndoAction()
last_line=editor.LineCount
u = editor:PositionFromLine(last_line)
editor:GotoPos(u)

#finally paste
editor:Paste()
editor:EndUndoAction()

it works, but I'm almost sure there is a better way to open a new tab and paste the text there.

Thank you
Amir
Reply all
Reply to author
Forward
0 new messages