Force ENDEDIT for an "OBJ_EDIT"

 

Dear All,

Is there a way in the new MT4 to force ENDEDIT for an "OBJ_EDIT" without pressing the ENTER key and without external DLL intervention ?

I mean with a specific chart event or any other way.

Thank you for your help.

Eric
 

The motive of obj_edit is to have input inserted when necessary.

Doesn't it defeat the purpose of knowing the input is entered correctly when pressing ENTER key?


However, you could try endedit with timeout and see what happen.

 
deysmacro:

The motive of obj_edit is to have input inserted when necessary.

Doesn't it defeat the purpose of knowing the input is entered correctly when pressing ENTER key?


However, you could try endedit with timeout and see what happen.


I am not trying to end the edit before it is entered correctly. My need is when any chart event occurs (that also mean that the editing is done), to set a function that will confirm automatically the end of the editing ... essentially in case the ENTER key wasn't pressed.

Thank you for your help.

 
Let see what our senior would say about this.
 
Eric_:


Is there a way in the new MT4 to force ENDEDIT for an "OBJ_EDIT" without pressing the ENTER key and without external DLL intervention ?

I mean with a specific chart event or any other way.


what about WinApi Send An "ENTER" key ?
 
qjol:
what about WinApi Send An "ENTER" key ?
I am trying to find a solution without external DLL. Thank you for your help.
 
Eric_:
I am trying to find a solution without external DLL. Thank you for your help.


good luck
 
qjol:

good luck

Thank you !


I think something can be done with EventChartCustom but I have to admit that I didn't get how this function works. If a master in this new MT4 could give me some clues, it would be greatly appreciated.

 

Your request is becoming more advanced, so, you may need to ask someone code it for you.

https://www.mql5.com/en/job

 
Eric_:

Thank you !


I think something can be done with EventChartCustom but I have to admit that I didn't get how this function works. If a master in this new MT4 could give me some clues, it would be greatly appreciated.


I am afraid you cannot achieve it by EventChartCustom. It is really custom event and you cannot use it for natural event, that would be registered by objects on a chart. I noticed that in 628 the edit already ends up when a mouse clicks nearly anywhere, if it helps you. BTW, I wonder what happens if you read and set text to object while in edit.
 
BTW, I wonder what happens if you read and set text to object while in edit.

Properly coded and it will use predefined value until that value is changed and confirmed when the enter key pressed.