AnsweredAssumed Answered

Trigger a script by selecting text

Question asked by SteveFransen_1 on Dec 25, 2014
Latest reply on Dec 25, 2014 by philmodjunk

Title

Trigger a script by selecting text

Post

The requirement is to help the user enter text into a text field by changing the text that was selected or suggesting alternative text. To do this a script needs to be triggered when the user selects a word or more than one word.

I can do this in two steps using the OnObjectKeystroke script trigger: (1) the user selects the text then (2) types a key (e.g. tab) at which point the script is triggered and figures out the selected text using a combination of Get ( ActiveFieldContents ), Get ( ActiveSelectionStart ), and Get ( ActiveSelectionSize ).

How can I trigger the script without the second step? Ideally, the user would double click the word, or click and drag across multiple words, and the script would be triggered without further action.

Thanks

 

Outcomes