How to call mf.usermenu from Disks menu

Here you can discuss any topic concerning Far macro commands.
Post Reply
galaxy_far_FAR_away
Posts: 23
Joined: Mon 12 Aug, 2013 14:03
Has thanked: 6 times

How to call mf.usermenu from Disks menu

Post by galaxy_far_FAR_away »

I Like to make a Disks MenuItem which calls a user-menu ("Network.ini") - see attachment.

If I call mf.usermenu from a keyboard macro then user-menu displayed fine.

If I call mf.usermenu from Disks menu then this message appears (line numbers don't matters):

C:\Prg\Windows\FAR\Plugins\LuaMacro\LuaMacro.dll:
C:\Prg\Windows\FAR\Plugins\LuaMacro\api.lua:89: attempt to yield across C-call boundary
stack traceback:
[C]: in function 'yieldcall'
C:\Prg\Windows\FAR\Plugins\LuaMacro\api.lua:89: in function 'usermenu'
...aming\Far Manager\Profile\Macros\scripts\Net_PCs.lua:97: in function 'action'
C:\Prg\Windows\FAR\Plugins\LuaMacro\LuaMacro.lua:426: in function <C:\Prg\Windows\FAR\Plugins\LuaMacro\LuaMacro.lua:380>

FAR build 4991 x64. Is there a solution?

Many thanks for Your help!
Attachments
Call_MenuItem_from_Disks_menu.zip
(1.06 KiB) Downloaded 168 times
User avatar
John Doe
Бюрократ
Posts: 13801
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 72 times
Been thanked: 425 times
Contact:

How to call mf.usermenu from Disks menu

Post by John Doe »

macroapi_manual.en.chm::Misc/Restrictions in the use of some functions

So use mf.postmacto(mf.usermenu,...)
galaxy_far_FAR_away
Posts: 23
Joined: Mon 12 Aug, 2013 14:03
Has thanked: 6 times

How to call mf.usermenu from Disks menu

Post by galaxy_far_FAR_away »

mf.postmacto works well ;)

mf.postmacro works even better :)

Many thanks for enlighten me!
Post Reply

Return to “Macro Commands Discussions”