Here are a few LUA macros i use, they might be useful to others (I'll add more if i manage to make any other )
1. This macro will start the search dialog and paste the current selection into it.
Note : if there's no selection then the current row is selected and pasted
2. I have a lot of folders that start with "!" or "~" (they are named like that so they are at the start of the list of folders when sorted by name).
The problem is that Alt+Shift+` doesn't always start the "file search" dialog. This macro fixes that.
Edit: fixed name of 2nd script (i should probably pay more attention when copy/pasting code )
Edit2: removed the unnecessary return from the first script
FAR3: Simple LUA macros by me
FAR3: Simple LUA macros by me
Sorry for writing in English in the Russian forums, but i don't speak Russian and don't trust online translators.
"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA
"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA
Re: FAR3: Simple LUA macros by me
Thanx, i didn't know that, i'll update the macros.2useven10 wrote:DisableOutput flag is obsolette. It is default. If you need use opposite EnableOutput flag.
Sorry for writing in English in the Russian forums, but i don't speak Russian and don't trust online translators.
"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA
"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA
- HaRT
- Moderator
- Posts: 10866
- Joined: Tue 30 Aug, 2005 17:21
- Has thanked: 221 times
- Been thanked: 358 times
Re: FAR3: Simple LUA macros by me
cyberwolf
Thank you for sharing these.
Can you please correct the second spoiler name as it's the same as the first one.
Thank you for sharing these.
Can you please correct the second spoiler name as it's the same as the first one.
Фар есть инструмент, а не нянька. © 2009 DrKnS
- John Doe
- Бюрократ
- Posts: 13861
- Joined: Wed 27 Apr, 2005 20:42
- Has thanked: 74 times
- Been thanked: 428 times
- Contact:
Re: FAR3: Simple LUA macros by me
editor.searchforselectedtext
There is no need to return value from function action.
There is no need to return value from function action.
I am unable to reproduce your problemcyberwolf wrote:2. I have a lot of folders that start with "!" or "~"
[...]
The problem is that Alt+Shift+` doesn't always start the "file search" dialog.
Re: FAR3: Simple LUA macros by me
I thought i had to, i don't know where i got the idea that it needs to (i might have taken the idea from the condition function). I'll edit the first post and remove the return from it.John Doe wrote:editor.searchforselectedtext
There is no need to return value from function action.
I am unable to reproduce your problemcyberwolf wrote:2. I have a lot of folders that start with "!" or "~"
[...]
The problem is that Alt+Shift+` doesn't always start the "file search" dialog.
The problem with the "~" character is something related to the computer (or maybe the OS) not FAR. I work on 3 computers and on 2 of them if i press the ` or " button it doesn't show the character immediately, i need to press it again or press space. It's probably related to the localization since if i press the ' and then a i get the á character (same for " followed by a will be transformed into ä). On the 3rd computer (my home computer) this problem doesn't exist, i made the macro to overcome this problem on my work computers.
P.S. sorry for the many errors, i'm still a beginner at LUA and FAR scripting so i'm probably making some other mistakes too
Sorry for writing in English in the Russian forums, but i don't speak Russian and don't trust online translators.
"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA
"There’s no teacher who can teach anything new He can just help us to remember the things we always knew." ~ ENIGMA