Page 1 of 1

Robot editor

Posted: Sun Jan 22, 2017 4:26 am
by DGDanforth
I am attempting to implement a macro/scripting language used with TvEdit
at Stanford back circa 1974.

I do not see a good way to let a "program" enter and edit text in a document.
That is, rather than having a command originate from the keyboard or mouse it
originates from a program (toolDialog hovering over a document).

How would you do that?

-Doug

Re: Robot editor

Posted: Sun Jan 22, 2017 4:37 am
by Ivan Denisov
If I understand you task correctly I would recommend to make a wrapper around TextView. I did this for one of my project.

There is the example.
http://gitlab.molpit.org/molpit/blackbo ... Insert.odc
cpcinsert.png
cpcinsert.png (2.85 KiB) Viewed 11614 times

Re: Robot editor

Posted: Sun Jan 22, 2017 7:22 am
by Zinn
Doug
Do you mean somthing like Autoit? see https://www.autoitscript.com/site/
- Helmut

Re: Robot editor

Posted: Sun Jan 22, 2017 8:33 am
by DGDanforth
Ivan Denisov wrote:If I understand you task correctly I would recommend to make a wrapper around TextView. I did this for one of my project.

There is the example.
http://gitlab.molpit.org/molpit/blackbo ... Insert.odc
cpcinsert.png
Thanks, Ivan.
I have already done that and can indeed capture characters and mouse clicks.
What I am missing is to be able to send those back to the view but I realize
now that all I need to do is analyze how Ctrl-F works (search and replace).
That should show me what is necessary.
-Doug

Re: Robot editor

Posted: Sun Jan 22, 2017 8:40 am
by Robert
I don't immediately see why this topic is Center buisness- would this discussion be more appropriate on the community board?

Re: Robot editor

Posted: Sun Jan 22, 2017 8:47 am
by DGDanforth
Robert wrote:I don't immediately see why this topic is Center buisness- would this discussion be more appropriate on the community board?
Robert,
You are right. Its just that I feel more comfortable with the Center people.
I'll try and use the community board more often.
-Doug

Re: Robot editor

Posted: Mon Jan 23, 2017 9:20 am
by Josef Templ
DGDanforth wrote:I am attempting to implement a macro/scripting language used with TvEdit
at Stanford back circa 1974.

I do not see a good way to let a "program" enter and edit text in a document.
That is, rather than having a command originate from the keyboard or mouse it
originates from a program (toolDialog hovering over a document).

How would you do that?

-Doug
Doug, I am not sure if I understand your requirements correctly but
if you want to modify the "focus" text from a command of a toolDialog, you use
c := TextControllers.Focus();
within the command implementation to get access to the controller of the focus text.
Then you use c.text to get access to the text model and you use readers and writers
(or TextMappers) to read and write the text.

Whatever the requirements are, I agree with Robert that such questions should be
discussed in the community forum.

- Josef

Re: Robot editor

Posted: Mon Jan 23, 2017 10:01 am
by DGDanforth
Josef Templ wrote:
Doug, I am not sure if I understand your requirements correctly but
if you want to modify the "focus" text from a command of a toolDialog, you use
c := TextControllers.Focus();
within the command implementation to get access to the controller of the focus text.
Then you use c.text to get access to the text model and you use readers and writers
(or TextMappers) to read and write the text.

Whatever the requirements are, I agree with Robert that such questions should be
discussed in the community forum.

- Josef
Thanks, Josef. That is very close to what I need.
-Doug