Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Closed] TS menu
#1
Hi Gintaras, hi all

is it possible to fire a TS menu by code from a macro/function?

Thanks
#2
Yes, with mac. The autotext (aka TS menu) must have a trigger, even if you'll never use it, or QM will not activate it.
#3
with

mac "name of the TS menu" i end with error

Warning: name of the TS menu started this way may not work.
#4
What trigger the Autotext has?
#5
see screenshot, but works only when using **cs trigger.


Attached Files Image(s)
   
#6
Here works.

Autotext name of the TS menu
Trigger CAl     Help - how to add the trigger to the macro
Code:
Copy      Help
/b
**cs :'"ą"
**cs :'"č"
**cs :'"ę"
Macro Macro2202
Code:
Copy      Help
act "Notepad"
mac "name of the TS menu"

;Run this macro and type **cs in Notepad.
;It shows a list. When I select something in the list, replaces **cs.
#7
Does not work as expected.
I just want that mac "name of the TS menu" acts directly as if I pressed **cs
#8
Not possible. Use menu instead.
Menu Menu47
Code:
Copy      Help
;/pos text /noicons
ą[9]&1 :'"ą"
č[9]&2 :'"č"
ę[9]&3 :'"ę"
Macro Macro2202
Code:
Copy      Help
act "Notepad"
mac "Menu47"
#9
Yep, ended with that too, though it's not what I wanted but adapted my code to
use that trick.

TY a bunch Gintaras.
#10
Ok, Osd is quite useful, but:

1. i'd like to put text in systray, but can't (my monitor is 1920x1080), putting x=1900 y=1000
always have text in work area bottom, even with flag 16

2. i want black background and white text, but 0x000000 gives a grey color here. why?

TY
#11
0 is default color, use a nearest to black color.
Macro Macro2205
Code:
Copy      Help
OnScreenDisplay "Text" 0 -1 -1 "" 0 0xffffff 1 "black" 1
int w=wait(5 WV win("black" "QM_OSD_Class"))
GetWinXY w 0 0 0 _i
mov 0 ScreenHeight-_i w 1
#12
Perfect.
#13
Now something thougher.

I manage to put this OSD window in the systray, in the space between icons (I use a double sized taskbar).

Can you give me the right steps to have this OSD available for all the time QM is running.

I guess I must use init2 to create it, and destroy it when I leave.
But how to correctly declare a global variable in init2 so I can act on this OSD
through any macro/function in QM?

I think this one must be global
int w=win("black" "QM_OSD_Class")

or is it better/smarter to call int w=win("black" "QM_OSD_Class") in every macro/function that I create to interact?
#14
Can use global variable.
Then don't forget IsWindow.
We talk about OSD in TS menu topic.
#15
Yes, we derivated and drifted.

I'll open a new thread if needed.


Forum Jump:


Users browsing this thread: 1 Guest(s)