aveltmp Posted December 15, 2022 Share Posted December 15, 2022 I need to count the number of words the end user selects on a given text. The end users can highlight and unhighlight words by clicking on two buttons after selecting the words, so I need to add and subtract to the counter. I have been able to count the number of words selected when the button is clicked, but I need to add/subtract multiple times, otherwise the counter always restart everytime the user click one of the two buttons.This is the code I have right now:on mouseUpput the number of words of field "Text2" into tTextif the selectedText is not empty thenput number of words of selectedText into tSelectedput tText - tSelected into tNumberSelectedelseanswer "Por favor, seleccciona las palabras que quieres subrayar."pass mouseUpend ifAny suggestion? Link to comment Share on other sites More sharing options...
aveltmp Posted December 16, 2022 Author Share Posted December 16, 2022 No response about my word counternt problem. Link to comment Share on other sites More sharing options...
Kristin Posted December 16, 2022 Share Posted December 16, 2022 Hi @aveltmp, I know I am not personally familiar with the third party program you are referring to. So I am not familiar with the formula in your first post, and I am also a little unclear what the goal is. With that as a preface, if I understand your goal, you can count words natively in Accordance. If you select a passage and click the "Analysis" it will tell you how many words there are in your selection. If you are trying to change the number, what is coming to my mind is for people to highlight specific words you want to eliminate, then use the CONTENTS function to eliminate the highlight style. This eliminates verses with the highlighted words in them, but sounds similar to what you are describing. I hope this helps some. Kristin Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now