The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Continuous RichEditHighlight
#1
Hi Gintaras,
Hope all is well!
I am trying to monitor continuously in text for the occurrence of certain string and then highlight it (as the user types). Simplified example below. Problem is that RichEditHighlight moves cursor back to starting position each time because of EM_SETSEL 0 0 message. Therefore can not have continuous typing because cursor position changes, etc.

Any thoughts on how to get around this?

Thanks for any thoughts,
Stuart



Code:
Copy      Help
rep
,1
,int w=win("WordPad" "WordPadClass")
,int w1=win("Document - WordPad" "WordPadClass")
,int cid=id(59648 w) ;;editable text 'Rich Text Window'
,str text.getwintext(cid)
,out text
,;if findrx(text "\bred\b") > -1
,RichEditHighlight(cid "\bred\b" 4 ColorFromRGB(255 255 255) ColorFromRGB(255 0 0))
,RichEditHighlight(cid "\bgreen\b" 4 ColorFromRGB(255 255 255) ColorFromRGB(0 255 0))


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)