Macro Browser problem Topic is solved

You have encountered a problem using Far Manager? Here you can get help.
Post Reply
KlepetoX
Posts: 110
Joined: Sun 08 Jan, 2012 08:23
Location: Czech Republic

Macro Browser problem

Post by KlepetoX » Sun 23 Sep, 2018 14:42

I call Macro Browser from some macros, now it has stopped working:

Far 5201 works well, command:

Code: Select all

Plugin.Menu("4EBBEFC8-2084-4B7F-94C0-692CE136894D")
correctly shows Macro Browser

Far 5261 doesn't work:

Code: Select all

Plugin.Menu("4EBBEFC8-2084-4B7F-94C0-692CE136894D")
shows nothing, if I evaluate expression, the result is "false".

What's the problem? Bad or changed GUID?

Shmuel
Posts: 5536
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 21 times
Been thanked: 181 times

Macro Browser problem

Post by Shmuel » Sun 23 Sep, 2018 15:26

Plugin.Menu() has 2 arguments, the 1-st is plugin's GUID, the 2-nd - menu item GUID.
As long as a plugin displays only 1 menu item in Plugins Menu, one can call Plugin.Menu() with 1 argument and it would work.
I guess you have more than 1 LuaMacro menu item. Change your call to the following:
Plugin.Menu("4EBBEFC8-2084-4B7F-94C0-692CE136894D","EF6D67A2-59F7-4DF3-952E-F9049877B492")

KlepetoX
Posts: 110
Joined: Sun 08 Jan, 2012 08:23
Location: Czech Republic

Macro Browser problem

Post by KlepetoX » Sun 23 Sep, 2018 16:09

Thanks, works perfectly. I tried to find the reason and have found it. First I deleted all plugins except of Macro Browser, nothing happend, still doesn't work. Then I tried delete some newer macros - and the problem is caused by macro PickPathFromOtherFAR.lua http://forum.farmanager.com/viewtopic.p ... 45#p127345.

I tried to delete it and everything works again...

Shmuel
Posts: 5536
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 21 times
Been thanked: 181 times

Macro Browser problem

Post by Shmuel » Sun 23 Sep, 2018 16:16

KlepetoX wrote:
Sun 23 Sep, 2018 16:09
and the problem is caused by macro PickPathFromOtherFAR.lua
I tried to delete it and everything works again...
There was absolutely no problem with PickPathFromOtherFAR.lua.
The problem was in your calling Plugin.Menu() with 1 argument instead of 2 arguments required.

KlepetoX
Posts: 110
Joined: Sun 08 Jan, 2012 08:23
Location: Czech Republic

Macro Browser problem

Post by KlepetoX » Sun 23 Sep, 2018 17:05

Yes, you are absolutely right, I changed it and call it with 2 arguments now. But when I delete macro PickPathFromOtherFAR.lua, second argument is not necessary. I thought that problem is in new FAR version, but originated by downloading that macro. Now, with 2 arguments is everything OK.

Shmuel
Posts: 5536
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 21 times
Been thanked: 181 times

Macro Browser problem

Post by Shmuel » Sun 23 Sep, 2018 17:12

KlepetoX wrote:
Sun 23 Sep, 2018 17:05
But when I delete macro PickPathFromOtherFAR.lua, second argument is not necessary.
If the building has only 1 flat, the number of building is enough to deliver letters. But if there are multiple flats in the building the postman needs 2 numbers: number of building and a number of flat.

Post Reply

Return to “Support and Troubleshooting”