Help with macros for editor

Here you can discuss any topic concerning Far macro commands.
Post Reply
KlepetoX
Posts: 102
Joined: Sun 08 Jan, 2012 08:23
Location: Czech Republic

Help with macros for editor

Post by KlepetoX » Fri 29 Mar, 2013 14:27

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: 5227
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 16 times
Been thanked: 151 times

Re: Help with macros for editor

Post by Shmuel » Fri 29 Mar, 2013 15:04

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: 102
Joined: Sun 08 Jan, 2012 08:23
Location: Czech Republic

Re: Help with macros for editor

Post by KlepetoX » Fri 29 Mar, 2013 18:46

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: 5227
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 16 times
Been thanked: 151 times

Re: Help with macros for editor

Post by Shmuel » Fri 29 Mar, 2013 19:08

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: 11390
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 17 times
Been thanked: 101 times

Re: Help with macros for editor

Post by John Doe » Fri 29 Mar, 2013 19:27

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

Post Reply

Return to “Macro Commands Discussions”