Page 1 of 1

Macros have been moved from macros.db to files

Posted: Thu 13 Dec, 2012 10:19
by Shmuel
Starting from build 3001 macros are kept as files in the %FARPROFILE%\Macros\scripts directory and its subdirectories.
Lua-modules are kept in %FARPROFILE%\Macros\modules.
Conversion of the existing macros can be done with the db2file.lua macro. It should be launched from under Far 2927-3000 (i.e. before upgrading to 3001+):

Code: Select all

lm:post @db2file.lua
(If there's a message that dbfile.lua not found, specify its name with the full path).
After that Far Manager can be upgraded.
db2file.lua moves macros and constants, modules (if any) should be moved manually.
If you're experiencing difficulties with the upgrade, please report about them.

Re: Macros have been moved from macros.db to files

Posted: Thu 13 Dec, 2012 10:25
by cyberwolf
Thank you very much for the information.

I had a few errors that some file could not be accessed, but after restarting FAR the script worked without a problem.

Question, the Macrolib plugin is still needed ? or the fmlua files can be converted into lua scripts and moved to the %profile%/macros/scripts folder ?

Re: Macros have been moved from macros.db to files

Posted: Thu 13 Dec, 2012 13:12
by Shmuel
cyberwolf wrote:Question, the Macrolib plugin is still needed ? or the fmlua files can be converted into lua scripts and moved to the %profile%/macros/scripts folder ?
It depends. In general, MacroLib has some features that Far doesn't have (e.g. multiple areas, multiple macros bound to one key, etc.). So, if those extra features are important to you, then just keep using MacroLib, there is nothing wrong in using it.

Re: Macros have been moved from macros.db to files

Posted: Thu 13 Dec, 2012 13:42
by cyberwolf
Shmuel wrote: It depends. In general, MacroLib has some features that Far doesn't have (e.g. multiple areas, multiple macros bound to one key, etc.). So, if those extra features are important to you, then just keep using MacroLib, there is nothing wrong in using it.
I didn't know about the limitations of FAR's macros, thanks for the info.
I'll then keep the MacroLib since i have quite a few scripts for it and i don't have the time and knowledge to rewrite them in FAR's lua macro.

.lua files in addon folder

Posted: Thu 10 Jan, 2013 11:11
by anormal
hi all,

i've recently migrated from far 2 to newest far 3,
i've been a long-long-time far user (since 1.50 i think)

i want to use ESC key and DEL key in panels (as i always used),

reading the forum i moved the .lua files Panel.Del.lua and Panel.Esc.lua to this folder

"C:\Documents and Settings\user\ConfiguraciĆ³n local\Datos de programa\Far Manager\Profile\macros\modules"

(i am spanish so this is the route to my "Application Data" folder)

but this don't work?

must i do something to use this lua files?

thanks!

Re: .lua files in addon folder

Posted: Thu 10 Jan, 2013 11:17
by Shmuel
C:\Documents and Settings\user\ConfiguraciĆ³n local\Datos de programa\Far Manager\Profile\macros\modules
It must be "scripts" at the end, not "modules".

Re: Macros have been moved from macros.db to files

Posted: Thu 10 Jan, 2013 19:02
by anormal
thanks for answer, i used this as reference:

"Starting from build 3001 macros are kept as files in the %FARPROFILE%\Macros\scripts directory and its subdirectories.
Lua-modules are kept in %FARPROFILE%\Macros\modules."

...

it seems the pc i was using it, the variable %farprofile% doesn't exist,
now i testing at home and it works perfect!

Re: Macros have been moved from macros.db to files

Posted: Thu 10 Jan, 2013 19:30
by Shmuel
anormal wrote:thanks for answer, i used this as reference:

"Starting from build 3001 macros are kept as files in the %FARPROFILE%\Macros\scripts directory and its subdirectories.
Lua-modules are kept in %FARPROFILE%\Macros\modules."
All .lua-files in Addon directory are macro-files, there are no modules in that directory.

Re: Macros have been moved from macros.db to files

Posted: Fri 11 Jan, 2013 09:02
by cyberwolf
anormal wrote:it seems the pc i was using it, the variable %farprofile% doesn't exist,
now i testing at home and it works perfect!
As a reminder, the %FARPROFILE% variable exists only under FAR and programs started from FAR, it's not a system variable that exists otherwise (unless you manually set it, but i strongly advise against it).

Re: Macros have been moved from macros.db to files

Posted: Fri 11 Jan, 2013 09:32
by anormal
ok, thanks both for the info!