Contextual Menu for "Choose From List" items?

Could it be possible to capture the selected/hovered item of “Choose From List” so it could be passed to different actions loaded in a contextual menu? Would be great to add some actions (Copy, Open with…, Reveal in Finder) to the items loaded with the Launcher preset.

Just amazing what BTT allows to create!

K.

I'm not sure whether I understand what you are trying to do. Can you post a concrete example?

Most likely you could e.g. set a variable or use some other mechanism to achieve this

After searching an item from the Launcher (Created with Choose From List populated by simple JSON) being able to do actions with the item found. Like some launcher apps allow to trigger alternative actions or pass the found item to a new workflow.

Maybe inside the Simple JSON format, add an alternate action (contextual menu) to be activated by a different trigger (RightClick or Tab)?

K.

the launcher supports submenus, would that solve your issue?

Yes, I think it would! That way the submenu items would have direct access to the searched item as a variable (filepath), right?

Tried to trigger the alternative action in two different ways, but not success yet. Do you know what to adjust or other method to make it work?

menuItems.push({
  title: fileName,
  actions: {
   standard: `js::(async () => {runShellScript({script: 'open "${item.filePath}"'})})()`,
   rightclick: `js::(async () => {runShellScript({script: 'open -R "${item.filePath}"'})})()`,
    				},
   icon: "fontawesome::file::width@@30",
  		});
menuItems.push({
  title: fileName,
  action: `js::(async () => {
    let pressedMouseButtons = await get_string_variable({variable_name: 'currently_pressed_mouse_buttons'});
    let pressedKeyboardKeys = await get_string_variable({variable_name: 'currently_pressed_keyboard_keys'});
    if (pressedMouseButtons.includes('2') || pressedKeyboardKeys.includes('55')) {
    await runShellScript({script: 'open -R "${item.filePath}"'});
  } else {
    await runShellScript({script: 'open "${item.filePath}"'});
  }
})()`,
   icon: "fontawesome::file::width@@30",
  		});