Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automate macros/elements within quick macros
#1
Is it possible to automate certain elements within quick macros.
What I am trying:

On the left side of quick macros you have the macro-tree-view
Is it possible to target a macro "file" within that tree-view and insert text in the macro (from textfile / string / ...)

Example
Code:
Copy      Help
[QM ROOT]
|
|__[PROJECT1]
      |
      |-- function1
      |-- function2
      etc...

The above is the tree-view on the left-side of quick macros and I want to target "function1".
I have a string variable S which contains "test text"

I want to (if possible) a macro that:
- scroll to the folder [PROJECT1], I want [PROJECT1] to be shown at the very top of the tree-view within quick macros
- expand folder [PROJECT1]
- select /focus on "function1"
- and then enter the contents of variable S in the editor window (this is the window on right, where you edit script).
- and enter the name of the selected macro on in the editor window "function1"

Is this possible? How can I achieve this?
#2
To open a QM item and expand its folder:
Macro Macro1845
Code:
Copy      Help
mac+ "Function1"

To replace text of a QM item with possibility to Undo:
Macro Macro1845
Code:
Copy      Help
str macro="Function1"
str addText="more text"
str s.getmacro(macro)
s.addline(addText)
s.setmacro(macro)

To get tree view control handle of the QM items list:
Macro Macro1845
Code:
Copy      Help
int htv=id(2202 _hwndqm)
To get tree view control item handle of a QM item:
Macro Macro1845
Code:
Copy      Help
QMITEM q
int iid=qmitem("New Folder" 0 q)
if(!iid) end "not found"
out q.htvi
With these handles you can use tree view control messages to scroll, expand, etc. Documented in MSDN Library.
#3
thank you!!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)