Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Execute TS MEnu using a key command
#1
Is it possible to excute a TS menu item through a macro/function using a key command? If yes how? If not is there another, than using key, way to do it?

Thanks
#2
why need it?
#3
I want to execute a TS Menu item through a normal menu. I understand another way to do it is to copy/paste the part of TS Menu macro that I need into a menu macro; however, this is not than elegant. Last, but not least, QM is an excellent tool to learn computer related issues. I am learning computing since 1968. It is a way of living.
#4
Function ExecuteTsMenuItem
Code:
Copy      Help
;/
function $itemText [$tsMenu]

;Executes specified TS menu item.

;itemText - TS menu item text.
;tsMenu - TS menu name.


if(empty(tsMenu)) tsMenu="TS Menu4" ;;change this to your default TS menu name

;create temp popup menu
str s.getmacro(tsMenu)
str ss.getmacro("temp_ETSMI"); err
if(ss!s) newitem("temp_ETSMI" s "Menu" "" "\User\Temp" 3)
;run item
mac "temp_ETSMI" itemText

err+ end _error

;How it works?
;Creates a temporary popup menu with text of the TS menu.
;Popup menus have a feature that TS menus don't: an item can be executed with mac without showing the popup menu.
#5
Dear Gintaras,

Perfect, as always. Best regards. Simos.


Forum Jump:


Users browsing this thread: 1 Guest(s)