Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clearing Seletect text Before setwintext-getwintext
#1
Hello G.
I have a dialog that stores part of the window text into a Rich Edit. It works fine BUT everytime the window text changes and the dialog gets to new window name using "getwintext" and "setwintext" the text overlaps the old text and makes it unreadable. All i want to do is enter somthing that will Clear the text in the window right before setwintext and getwintext.

Thanks G.
Smile 8)
#2
i think that if you use setwintext with an empty string, it'll do the trick.
An old blog on QM coding and automation.

The Macro Hook
#3
ken gray Wrote:i think that if you use setwintext with an empty string, it'll do the trick.
tried that and it dont work.
tried the following...
Code:
Copy      Help
s="";s.setwintext(id(11 win("Notepad" "#32770")))

s="                 ";s.setwintext(id(11 win("Notepad" "#32770")))
Smile 8)
#4
is that the regular windows notepad?
mine doesnt have that class?
An old blog on QM coding and automation.

The Macro Hook
#5
ken gray Wrote:is that the regular windows notepad?
mine doesnt have that class?
no thats not reg. i just made somthing up outa the blue lol
Smile 8)
#6
this worked for me.

Code:
Copy      Help
_s.getwintext(id(15 win("*Notepad" "" "" 1)))
out _s
_s=""
_s.setwintext(id(15 win("*Notepad" "" "" 1)))
An old blog on QM coding and automation.

The Macro Hook
#7
ken gray Wrote:this worked for me.

Code:
Copy      Help
_s.getwintext(id(15 win("*Notepad" "" "" 1)))
out _s
_s=""
_s.setwintext(id(15 win("*Notepad" "" "" 1)))
thanks ken
Smile 8)


Forum Jump:


Users browsing this thread: 1 Guest(s)