Posts: 44
Threads: 14
Joined: Nov 2008
hello i want to get the text thats in the output box and put it in my dialog i tryedthis code but it dont seem 2 work if u got any help please reply thanks.
int h
str s
h=child(2201 "" "" win("Quick Macros" "#32770") 0x8 344 383)
s.getwintext(h)
h=child(3 "" "" win("Dialog" "#32770") 0x8 435 349)
s.setwintext(h)
Posts: 12,074
Threads: 141
Joined: Dec 2002
QM uses several controls based on scintilla library. These controls don't support getwintext. Use this function.
Function
SciGetText
;/
function hwnd str&s
;Gets text from a scintilla-based control in QM.
;Such controls are: code editors (QM_Code class), output (QM_Output), tips (QM_Tips), qml viewer code view (QM_Code).
;Note that, if there is a link, it will get some garbage text around. In the control it is hidden.
;hwnd - control handle.
;s - receives text.
;EXAMPLE
;int h=id(2201 _hwndqm) ;;qm output
;;int h=GetQmCodeEditor ;;currently active code editor
;str s
;SciGetText h s
;ShowText "" s
int lens=SendMessage(hwnd SCI.SCI_GETTEXTLENGTH 0 0)
s.fix(SendMessage(hwnd SCI.SCI_GETTEXT lens+1 s.all(lens)))