WriteEdit

Windows management function.

The WriteEdit function writes into the specified edit field.

Syntax

WriteEdit(<edit_field>,<text>)
or
ret=WriteEdit(<edit_field>,<text>)

Parameters

<edit_field>, string, name of the edit field.

<text>, string, text to write into the edit field.

Return value

Ret, numeric return code. When the write is successful, the function returns 0, otherwise use this return code for Error Handling.

Remarks

WriteEdit writes in standard edit fields. If WriteEdit does not work on your specific edit field, use SendKeys instead such as :

towrite$="my text"

UseWindow(<window_name_of_the_edit_field>)

SendKeys(towrite$,NoActivate)

Sometimes, you will want to delete the content of the edit field before writing your text, here is an example :

towrite$="my text"

UseWindow(<window_name_of_the_edit_field>)

SendKeys("<Home>",NoActivate)

pause 5 ticks
SendKeys("<Shift <End>>",NoActivate)

pause 5 ticks
SendKeys("<Del>",NoActivate)

pause 5 ticks
SendKeys(towrite$,NoActivate)

Examples

 

WriteEdit("1", "Hello")

Result = WriteEdit(var_id$, text$)