UI text input char replace
Posted: 05 Aug 2017 12:29
Hi,
Just got the following working:
text = getTextById("com.p1.chompsms:id/new_message_field");
text=replace(text, '“', '"');
setText2ById("com.p1.chompsms:id/new_message_field", text);
Normally I want the character " for scripting, in the case above typing SMS.
If the character “ appears, it should be replaced with ", hope you see the little difference.
It works with chomp SMS because I got the text id.
Could this be done global as well?
Package with *
Getting the textfield id which has focus, replacing the character and writing the new value back?
Thanks a lot,
Just got the following working:
text = getTextById("com.p1.chompsms:id/new_message_field");
text=replace(text, '“', '"');
setText2ById("com.p1.chompsms:id/new_message_field", text);
Normally I want the character " for scripting, in the case above typing SMS.
If the character “ appears, it should be replaced with ", hope you see the little difference.
It works with chomp SMS because I got the text id.
Could this be done global as well?
Package with *
Getting the textfield id which has focus, replacing the character and writing the new value back?
Thanks a lot,