Revert "Revert "Improving generated script by EditText function""

This reverts commit 3ea725b9487c21126a4348f965676bc51c7ee7f5.