AnsweredAssumed Answered

Triggered Script question

Question asked by RickWhitelaw on Oct 23, 2009
Latest reply on Oct 27, 2009 by RickWhitelaw


Triggered Script question




I have a script triggered OnObjectEntered that changes plain text to bold and vice-versa:


Triggered: Add_Remove Bold


If [ PatternCount ( GetAsCSS ( Get ( ActiveFieldContents ) ); "bold") = 0 ] 

Set Field [ TextStyleAdd ( Get ( ActiveFieldContents ); Bold ) ]


Set Field [ TextStyleRemove ( Get ( ActiveFieldContents );Bold ) ]

End If


 It works fine except I'd like it NOT to be triggered if the field is entered via the tab key (Code 9). "If Code(Get(TriggerKeystroke))<> 9" won't work as a condition with OnObjectEnter since the script isn't necessarily triggered by a Keystroke. OnObjectEnter triggers after the trigger event in any case. I want to be able to Tab to the field and enter it by clicking which triggers the script.I suspect "enter" means "enter" and that's it.