Macros have been moved from macros.db to files

Here you can discuss any topic concerning Far macro commands.
Post Reply
Shmuel
Posts: 6815
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 526 times

Macros have been moved from macros.db to files

Post 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.
Last edited by Shmuel on Thu 13 Dec, 2012 12:00, edited 2 times in total.
cyberwolf
Posts: 109
Joined: Tue 24 Mar, 2009 14:39
Been thanked: 2 times

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

Post 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 ?
Sorry for writing in English in the Russian forums, but i don't speak Russian and don't trust online translators. :D

"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA
Shmuel
Posts: 6815
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 526 times

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

Post 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.
cyberwolf
Posts: 109
Joined: Tue 24 Mar, 2009 14:39
Been thanked: 2 times

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

Post 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.
Sorry for writing in English in the Russian forums, but i don't speak Russian and don't trust online translators. :D

"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA
anormal
Posts: 12
Joined: Thu 10 Jan, 2013 11:06

.lua files in addon folder

Post 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!
Shmuel
Posts: 6815
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 526 times

Re: .lua files in addon folder

Post 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".
anormal
Posts: 12
Joined: Thu 10 Jan, 2013 11:06

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

Post 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!
Shmuel
Posts: 6815
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 526 times

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

Post 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.
cyberwolf
Posts: 109
Joined: Tue 24 Mar, 2009 14:39
Been thanked: 2 times

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

Post 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).
Sorry for writing in English in the Russian forums, but i don't speak Russian and don't trust online translators. :D

"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA
anormal
Posts: 12
Joined: Thu 10 Jan, 2013 11:06

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

Post by anormal »

ok, thanks both for the info!
Post Reply

Return to “Macro Commands Discussions”