Page 1 of 1

MDI history not updated when using macro

PostPosted: Wed Nov 17, 2021 1:44 pm
by cseyler
Hi,

I've noticed this annoying (for me) issue : If a macro set and validate the field 1000 (MDI entry), the command is not added to the history.

If I put the following code in m20001.txt

Code: Select all
AS3.Setfieldtext("g0 x100", 1000);
AS3.Validatefield(1000);


And create a button 20001 (auto link to macro), the command "g0 x100" is executed and the MDI led blink. But the command is not added to the history.

Re: MDI history not updated when using macro

PostPosted: Wed Nov 17, 2021 3:17 pm
by cncdrive
Yes, I think the history is updated from the physical text input and so it is not updated from the macro calls.
This is not a bug, but why do you need to update it from macro?

Re: MDI history not updated when using macro

PostPosted: Wed Nov 17, 2021 4:03 pm
by cseyler
I made a popup window that show the MDI entry history:

I included a textbox to give the ability to select an old command and editing it before executing it. Instead of using exec.Code() to execute the modifed command line, I set the MDI entry field (1000) and validate it (ok it works) hoping that the new modified command will be added to the MDI history

Re: MDI history not updated when using macro

PostPosted: Wed Nov 17, 2021 4:31 pm
by dezsoe
Did you try the On-screen keyboard plugin? It has its own history and you can edit the lines before sending to MDI.

Re: MDI history not updated when using macro

PostPosted: Wed Nov 17, 2021 5:19 pm
by cseyler
dezsoe wrote:Did you try the On-screen keyboard plugin? It has its own history and you can edit the lines before sending to MDI.


Yes I did. I just found that the on screen plugin is a bit too intrusive in my UI just for this purpose.
I guess if i want this feature, I will to to a custom plugin that maintain its own history list