Robot editor

Post Reply
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Robot editor

Post 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
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: Robot editor

Post 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 7762 times
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: Robot editor

Post by Zinn »

Doug
Do you mean somthing like Autoit? see https://www.autoitscript.com/site/
- Helmut
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: Robot editor

Post 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
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: Robot editor

Post by Robert »

I don't immediately see why this topic is Center buisness- would this discussion be more appropriate on the community board?
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: Robot editor

Post 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
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: Robot editor

Post 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
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: Robot editor

Post 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
Post Reply