Page 1 of 1

Run lua script (with Hotkey definition) from Command Line

Posted: Tue 06 Jan, 2015 18:45
by farman
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 do this?

Code: Select all

Macro { description="Test 1"; area="Shell"; key="CtrlShiftF3"; flags="";
        action = function()  Keys("F3")  end; }

Run lua script (with Hotkey definition) from Command Line

Posted: Tue 06 Jan, 2015 18:49
by Shmuel
farman wrote: But I like to execute a script with a defined hotkey
May be lua:eval("Shell/F3",2) is what you want.

Run lua script (with Hotkey definition) from Command Line

Posted: Tue 06 Jan, 2015 19:07
by farman
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.