Is there any way to count characters while typing them into automagic?
Say I have an input dialog where I am collecting a string to populate a field with a 70 char max limit.
Seeing in real time how many char you are using maybe via a screen notification would be useful.
Thank you.
Any way to count character while typing?
Moderator: Martin
- tsolignani
- Posts: 187
- Joined: 12 Jan 2019 11:53
- Location: Vignola, Mo, Italy
- Contact:
Re: Any way to count character while typing?
Hi
If string length greater than 70 characters you will be go back to input dialog. String length lower than 70 characters you will be continued.put everything As in screen shot.
See screen shot.
From record4
If string length greater than 70 characters you will be go back to input dialog. String length lower than 70 characters you will be continued.put everything As in screen shot.
See screen shot.
From record4
- Attachments
-
- Screen shot
- 21.08.2019 18-10.png (100.71 KiB) Viewed 9485 times
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1
Re: Any way to count character while typing?
Currently Input dialog doesn't have that function. But you can create your own by using widget.
You can also use screen notification (notification on screen), by putting the Control UI in other flow and use looped Control UI to check the Input Dialog text content length. But as I tried, the constant toast message is so annoying and distracting. The speed also limited to 1 update per seconds. You can also use Trigger UI event and check for text changed. But again it will trigger so frequently that it will probably freeze your phone as you type the text.
So far, I think widget method is the best. I have attached the flow : Char Count and Widget The count using a widget as the text count display.
1. Before the input dialog, show the widget
2. Launch the input dialog, along with the parallel execution of Control UI. This Control UI has looped script to retrieve the word and count the length, then set it to widget every 500 ms (the fastest speed you can update a widget)
4. I put another 2 checks for the length. If it is more than 50 chars, change the color to yellow. If more than 70 chars, change color to red. We can force a cancel and clear out the text on over 70 chars, but I think that is too harsh. You just need a visual clue that you have overtyped the text.
3. Once you press OK or cancel, it will hide the widget
4. If you press OK, then it will continue to show the toast message of what you have typed, including the char count
BTW, I forgot to give comment (description) inside the CUI script and have uploaded it. I don't want to reupload unless it is necessary. Since it is short, I think it is still readable by most of us. As usual, modify the flow as you need.
You can also use screen notification (notification on screen), by putting the Control UI in other flow and use looped Control UI to check the Input Dialog text content length. But as I tried, the constant toast message is so annoying and distracting. The speed also limited to 1 update per seconds. You can also use Trigger UI event and check for text changed. But again it will trigger so frequently that it will probably freeze your phone as you type the text.
So far, I think widget method is the best. I have attached the flow : Char Count and Widget The count using a widget as the text count display.
1. Before the input dialog, show the widget
2. Launch the input dialog, along with the parallel execution of Control UI. This Control UI has looped script to retrieve the word and count the length, then set it to widget every 500 ms (the fastest speed you can update a widget)
4. I put another 2 checks for the length. If it is more than 50 chars, change the color to yellow. If more than 70 chars, change color to red. We can force a cancel and clear out the text on over 70 chars, but I think that is too harsh. You just need a visual clue that you have overtyped the text.
3. Once you press OK or cancel, it will hide the widget
4. If you press OK, then it will continue to show the toast message of what you have typed, including the char count
BTW, I forgot to give comment (description) inside the CUI script and have uploaded it. I don't want to reupload unless it is necessary. Since it is short, I think it is still readable by most of us. As usual, modify the flow as you need.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
- tsolignani
- Posts: 187
- Joined: 12 Jan 2019 11:53
- Location: Vignola, Mo, Italy
- Contact:
Re: Any way to count character while typing?
Wow. That's just what I needed. And I learned many new things as well! Thank you so much! Automagic is really magic, I am using my peripherals the good way, at last. Love it. Thanks.