Help with macros for editor

Here you can discuss any topic concerning Far macro commands.
Post Reply
KlepetoX
Posts: 129
Joined: Sun 08 Jan, 2012 08:23
Location: Czech Republic
Has thanked: 2 times
Been thanked: 1 time

Help with macros for editor

Post by KlepetoX »

Hi, I am writing set of macros for editor and I have these questions:

1) How can I go (set position) to the start and end of selection (with persistent blocks on, if needed)
2) How can I get a number of selected lines (I just need to know if only one or more lines is selected)
3) How can I get an extension of edited file (but what about a new file without name?) - need various actions for various file types (i.e. mark as commets)

And the last question - where can I find (if exists at all) any documentation of macro language? I have found http://api.farmanager.com/ru/macro/index.html , but it is not actual for FAR3 new macro language. It can be in Russian (I can read it, still remember from school :roll: ), but English would be great.

Thanks
Shmuel
Posts: 6815
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 526 times

Re: Help with macros for editor

Post by Shmuel »

KlepetoX wrote:And the last question - where can I find (if exists at all) any documentation of macro language? I have found http://api.farmanager.com/ru/macro/index.html , but it is not actual for FAR3 new macro language. It can be in Russian (I can read it, still remember from school :roll: ), but English would be great.
Look at %farhome%\Encyclopedia\macroapi_manual.chm. It's in Russian, and it assumes the reader is familiar with http://api.farmanager.com/ru/macro/index.html.
KlepetoX
Posts: 129
Joined: Sun 08 Jan, 2012 08:23
Location: Czech Republic
Has thanked: 2 times
Been thanked: 1 time

Re: Help with macros for editor

Post by KlepetoX »

Shmuel, macroapi_manual.chm is very useful, but it doesn't give me answers for previous questions (maybe I'm looking for them badly)...
Shmuel
Posts: 6815
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 526 times

Re: Help with macros for editor

Post by Shmuel »

KlepetoX wrote:Shmuel, macroapi_manual.chm is very useful, but it doesn't give me answers for previous questions (maybe I'm looking for them badly)...
Well, at least I've answered your last question. :ha:
With regards to your other questions: unfortunately I don't have enough time to answer them.
I can recommend you to:
-- study macro-API and LuaFAR-API (and Lua, of course)
-- study macros by other people, they are all open source
User avatar
John Doe
Бюрократ
Posts: 13801
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 72 times
Been thanked: 425 times
Contact:

Re: Help with macros for editor

Post by John Doe »

KlepetoX
Try modified macroapi_manual.chm, with references to old macro language.
Post Reply

Return to “Macro Commands Discussions”