October 8, 200817 yr I want to be able to highlight a portion of the text in a field and then run a script to change the text's color. Is there a way to do that? Thanks
October 8, 200817 yr Sure. Something like: If [ Get ( ActiveSelectionSize ) ] Insert Calculated Result [ TextColor ( Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize ) ) ; RGB ( 240 ; 0 ; 0 ) ) ] Else Show Custom Dialog [ Message: "Select some text first."; Buttons: “OK” ] End If
October 9, 200817 yr Author That's works fine. Now I need to be able to find text that is formatted as "strikethough" and delete it. Thanks
October 9, 200817 yr That's a whole new ball game. Do you mean find the formatted text within the field, or find records containing formatted text?
October 9, 200817 yr Author Find the text within a field. For example the text might be "The (test) examination is cancelled" assuming the word in parens is actually a strikethrough. Once the script is run the text would be "The examination is cancelled." Rich
October 9, 200817 yr That's going to take some work. I suggest you take a look at the GetAsSVG() function. If you direct your script to look for "text-decoration:line-through" in the StyleList branch of the result, you can then extract the Begin and End position indicators, and use them to "by-pass" the striked text. Since there can be more than one such section, your script (or custom function) needs to loop until the style cannot be found.
October 9, 200817 yr Now I need to be able to find text that is formatted as "strikethough" and delete it. Hi try this file to have an idea... strikethough.zip
Create an account or sign in to comment