Search found 118 matches

by farman
Thu 22 Jan, 2015 08:29
Forum: Support and Troubleshooting
Topic: Bookmark-macro with "[LR]CtrlShift0" in Editor doesn't work
Replies: 9
Views: 15041

Bookmark-macro with "[LR]CtrlShift0" in Editor doesn't work

The keycombination was working well for a long time, but some far-versions ago it stopped.
by farman
Thu 22 Jan, 2015 08:25
Forum: Support and Troubleshooting
Topic: Bookmark-macro with "[LR]CtrlShift0" in Editor doesn't work
Replies: 9
Views: 15041

Bookmark-macro with "[LR]CtrlShift0" in Editor doesn't work

Every key Combination on "0" is working except "[LR]CtrlShift0".
Restarted Far, restarted PC, several PC...
by farman
Thu 22 Jan, 2015 07:43
Forum: Support and Troubleshooting
Topic: Bookmark-macro with "[LR]CtrlShift0" in Editor doesn't work
Replies: 9
Views: 15041

Bookmark-macro with "[LR]CtrlShift0" in Editor doesn't work

Thanks for your advice, Shmuel. Here are the results:
- Macro isn't called (2).
- Flag doesn't change anything.
Macro was tested in a clean FAR.
by farman
Thu 22 Jan, 2015 07:05
Forum: Support and Troubleshooting
Topic: Bookmark-macro with "[LR]CtrlShift0" in Editor doesn't work
Replies: 9
Views: 15041

Bookmark-macro with "[LR]CtrlShift0" in Editor doesn't work

This macro replaces the original keys "set/goto bookmark" in Editor. Everything works fine except set bookmark with "[LR]CtrlShift0" which does nothing. Goto Bookmark with "[LR]Ctrl0" works. Any Ideas? Maybe a national (german) keyboard problem again? Macro { descriptio...
by farman
Tue 06 Jan, 2015 20:15
Forum: Macro Commands Discussions
Topic: How to use "Groups of file masks" in lua script
Replies: 4
Views: 13086

How to use "Groups of file masks" in lua script

Ah, easy again. Thanx John. ... local fnExt = mf.fsplit(APanel.Current,0x8) local bFound=far.ProcessName (far.Flags.PN_CMPNAMELIST, "<media>", fnExt); if bFound then s="yes" else s="no" end; far.Message ("Extension=" .. fnExt .. " Found=" .. s)
by farman
Tue 06 Jan, 2015 19:15
Forum: Macro Commands Discussions
Topic: How to use "Groups of file masks" in lua script
Replies: 4
Views: 13086

How to use "Groups of file masks" in lua script

Oh, sorry. I have a ""Groups of file masks" (F9 - options) such as <batch> and want to take a look if there is a file extension (i.e. current filename) in it (in a lua script).
by farman
Tue 06 Jan, 2015 19:07
Forum: Macro Commands Discussions
Topic: Run lua script (with Hotkey definition) from Command Line
Replies: 2
Views: 13074

Run lua script (with Hotkey definition) from Command Line

Great. Executing a macro from a script file: "lua:eval("Shell/CtrlShiftF3", 2)" works fine.

Einstein was wrong. There IS someone faster than the speed of light. Thanx, Shmuel.
by farman
Tue 06 Jan, 2015 18:50
Forum: Macro Commands Discussions
Topic: How to use "Groups of file masks" in lua script
Replies: 4
Views: 13086

How to use "Groups of file masks" in lua script

I have several "Groups of file masks" defined which I like to use in a lua script. But I don't know how. Can someone please give me a hint?

Examples:
  • batch │ *.cmd,*.bat
    exec │ *.exe,*.com,*.scr,*.lnk,<batch>,%PATHEXT%
by farman
Tue 06 Jan, 2015 18:45
Forum: Macro Commands Discussions
Topic: Run lua script (with Hotkey definition) from Command Line
Replies: 2
Views: 13074

Run lua script (with Hotkey definition) from Command Line

To run a Lua script from command line there is "lua: @<filename> [<args>]". But I like to execute a script with a defined hotkey (i.e. the simplified script below) from a scriptfile with other functions in it. This should work in in FAR menu "File associations". Is there a way to...
by farman
Thu 23 Oct, 2014 05:51
Forum: Support and Troubleshooting
Topic: lua script and regex
Replies: 13
Views: 15416

lua script and regex

Thanx, AleXH. I knew about REsearch (and the powerful batch mode). But I need lua and the flexibility of a programming language in this case.
by farman
Thu 09 Oct, 2014 14:58
Forum: Support and Troubleshooting
Topic: lua script and regex
Replies: 13
Views: 15416

Re: lua script and regex

This usage is hard to remember (but now well documented here :))
I'll better use the regex in this cases.
by farman
Wed 08 Oct, 2014 18:00
Forum: Support and Troubleshooting
Topic: lua script and regex
Replies: 13
Views: 15416

Re: lua script and regex

Thanx for your clarification, John Doe.
But

Code: Select all

_s2 = string.gsub (_s2,"%f[%d][%.,]%f[%d]", "*")
doesn't work for me. No problems with

Code: Select all

_s2 = regex.gsub(_s2, "(?<=\\d)[\\.](?=\\d)", "*")
And I was so happy to see the missing link... :(
by farman
Tue 07 Oct, 2014 20:27
Forum: Support and Troubleshooting
Topic: lua script and regex
Replies: 13
Views: 15416

Re: lua script and regex

Ah, double slashes!
Thanx again Shmuel. You've given me back my belief that far handles everything.

So, here's a complete version if someone is looking for something similar:
_s2 = regex.gsub(_s2, "(?<=\\d)[\\.](?=\\d)", "x")
by farman
Tue 07 Oct, 2014 19:50
Forum: Support and Troubleshooting
Topic: lua script and regex
Replies: 13
Views: 15416

Re: lua script and regex

To my knowledge this doesn't seem to be a regex problem. But maybe I missed something very important. In Plugin RESearch I can find/replace all the "." between \d with this regex: (?<=\d)[\.](?=\d) In luafar (with gsub) this doesn't work. (?<=%d)[%.](?=%d) So, before i'm trying to fix my r...
by farman
Tue 07 Oct, 2014 18:45
Forum: Support and Troubleshooting
Topic: lua script and regex
Replies: 13
Views: 15416

Re: lua script and regex

Thanx, shmuel. But it isn't so easy... 1. "CleanFilenName" means that the filenames changes. So [repl] doesn't work :( FileName1="Long.File.With.Date.in.Name.2014.10.07.txt" FileName2="Another.one.07.10.2014.example.name is here.txt" .... I've tried my best searching th...

Go to advanced search