Run lua script (with Hotkey definition) from Command Line

Here you can discuss any topic concerning Far macro commands.
Post Reply
farman
Posts: 118
Joined: Thu 03 Sep, 2009 11:32

Run lua script (with Hotkey definition) from Command Line

Post by farman » Tue 06 Jan, 2015 18:45

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; }

Shmuel
Posts: 5041
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 11 times
Been thanked: 133 times

Run lua script (with Hotkey definition) from Command Line

Post by Shmuel » Tue 06 Jan, 2015 18:49

farman wrote: But I like to execute a script with a defined hotkey
May be lua:eval("Shell/F3",2) is what you want.

farman
Posts: 118
Joined: Thu 03 Sep, 2009 11:32

Run lua script (with Hotkey definition) from Command Line

Post by farman » Tue 06 Jan, 2015 19:07

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.

Post Reply

Return to “Macro Commands Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest