Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
auto split-screen
A function that would allow QM to automatically go into split-screen (just like [CTRL] + [T] ), when a function begins with "/macname".
Immediately after going to split-screen mode it would open "/macname" in the right-side.

As soon as the user clicks on another item within the tree it goes back to single-screen (unless the clicked item has a "/macname" as a first line.)

I think I could make this myself but I do not know how to:
- Trigger on tree-item click
- How to detect if QM is in split-screen mode (if splitscreen then toggle splitscreen off)
Function qm_item_open_in_right_or_bottom_code_editor
Trigger !n"" "QM_Editor" /QM     Help - how to add the trigger to the macro
Select All      Help
int itemId=qmitem("" 0 q 1); if(!itemId) ret

int hwndSecondaryEditor=id(2211 _hwndqm)
int isSplit=IsWindowVisible(hwndSecondaryEditor)
if(isSplit) int isSecondaryActive=(hwndSecondaryEditor=GetQmCodeEditor)

out F"isSplit={isSplit}, isSecondaryActive={isSecondaryActive}, QM item={}"

int menuCmd
sel 2
,case "* (right)" menuCmd=33546
,case "* (bottom)" menuCmd=33547
,case "* (primary)" menuCmd=33545
,case "* (primary&right)" menuCmd=33548
,case "* (primary&bottom)" menuCmd=33550
,case else
,if(isSplit) menuCmd=33545 ;;primary
if(!menuCmd) ret

int hwndMenuCommandReceiver=id(2213 _hwndqm)
men menuCmd hwndMenuCommandReceiver

Forum Jump:

Users browsing this thread: 1 Guest(s)