09-09-2013, 06:00 AM
question 1
How do I get the text from the left or right code editor pane in QM?
I got this from another topic, and it works.
But the problem is that it targets the left pane (id 2210)
Macro Macro11
How can I get the code within the pane that is active (2210 or 2211)?
Has it something to do with the FILTER class?
(beneath code is wrong)
Macro Macro14
question 2
And how do I get the ID of any currently active Window Control.
For example, the edit pane in notepad has ID '15'
Macro Macro14
If Notepad was the active window, how would I retrieve '15'
Should I first start with
Macro Macro14
To get the active window? And then use the GetWinId function?
But I can't get the syntax correct.
How do I get the text from the left or right code editor pane in QM?
I got this from another topic, and it works.
But the problem is that it targets the left pane (id 2210)
Macro Macro11
str s
int h=id(2210 _hwndqm)
int lens=SendMessage(h SCI.SCI_GETTEXTLENGTH 0 0)
s.fix(SendMessage(h SCI.SCI_GETTEXT lens+1 s.all(lens)))
out s
How can I get the code within the pane that is active (2210 or 2211)?
Has it something to do with the FILTER class?
(beneath code is wrong)
Macro Macro14
FILTER f
...
int h1 = id(2210 "Quick Macros")
int h2 = id(2211 "Quick Macros")
...
if(GetWinId(f.hwnd)=2210)
...
question 2
And how do I get the ID of any currently active Window Control.
For example, the edit pane in notepad has ID '15'
Macro Macro14
If Notepad was the active window, how would I retrieve '15'
Should I first start with
Macro Macro14
To get the active window? And then use the GetWinId function?
But I can't get the syntax correct.