Also use xjadeo 64bit windows version
[ardour.git] / scripts / access_action.lua
1 ardour {
2         ["type"]    = "EditorAction",
3         name        = "Shortcut",
4         license     = "MIT",
5         author      = "me",
6         description = [[Trigger a keyboard shortcut.  You will be prompted for the shortcut's action in the next step.]]
7 }
8
9 function action_params ()
10         local actionlist = {
11                 {
12                         type = "dropdown", key = "action", title = "Action", values = ArdourUI:actionlist(),
13                         default = "Save"
14                 }
15         }
16
17         local rv = LuaDialog.Dialog ("Select Action", actionlist):run ()
18         if not rv then -- user cancelled
19                 return { ["x-script-abort"] = { title = "", preseeded = true} }
20         end
21
22         local action = rv["action"]
23         local name = "Shortcut - " .. action
24         return {
25                 ["action"] = { title = "Action to trigger", default = action, preseeded = true},
26                 ["x-script-name"] = { title = "Unique Script name", default = name, preseeded = true},
27         }
28 end
29
30 function factory (params) return function ()
31         local p = params or { }
32         local as = assert (p["action"])
33         local sp = assert (as:find('/'))
34         local group = assert (as:sub(0, sp - 1))
35         local item = assert (as:sub(1 + sp))
36         Editor:access_action (group, item)
37 end end