best convert to a javascript action (right-click, convert to js)
async function transformedActions() {
let result = undefined;
result = await trigger_action({
json: JSON.stringify({
BTTIsPureAction: 1,
BTTPredefinedActionType: 100,
BTTPredefinedActionName: "Show Window Switcher for All Open Apps",
BTTAdditionalActionData: {
BTTWindowSwitcherHeight: 500,
BTTWindowSwitcherItemHeight: 30,
BTTWindowSwitcherWidth: 380,
BTTWindowSwitcherOverrideDefaultShortcuts: false,
BTTWindowSwitcherShowThumbnail: 1,
BTTWindowSwitcherExcludeHiddenAndMinimizedWindows: false,
BTTWindowSwitcherDisableMouseHover: false,
BTTWindowSwitcherExcludeAllButHiddenAndMinimizedWindows: false,
BTTWindowSwitcherSelectNextOnRepeat: true,
BTTWindowSwitcherExcludeSpecific: true,
BTTWindowSwitcherInitialFocus: 0,
BTTWindowSwitcherTriggerOnRelease: false,
BTTWindowSwitcherFocus: 0,
BTTWindowSwitcherShowPopover: 0,
BTTWindowSwitcherAppearance: 0,
BTTWindowSwitcherExcludeVisibleWindows: false,
BTTWindowSwitcherFontSize: 12,
BTTWindowSwitcherExclude: "^(?!Safari-).*$",
BTTWindowSwitcherSort: 0,
BTTWindowSwitcherExcludeWindowsFromOtherSpaces: false,
BTTWindowSwitcherMousePos: 0
}
}),
wait_for_reply: true
});
return true;
}
However currently you'd need to parse hovered_element_details variable to get the app name. In 6.300 I have added a new integrated variable "hovered_dock_app_name" so the JavaScript can now look like this:
async function showWindowSwitcherForHoveredDockApp() {
let hoveredDockAppName = await get_string_variable("hovered_dock_app_name");
let result = = await trigger_action({
json: JSON.stringify({
BTTIsPureAction: 1,
BTTPredefinedActionType: 100,
BTTPredefinedActionName: "Show Window Switcher for All Open Apps",
BTTAdditionalActionData: {
BTTWindowSwitcherHeight: 500,
BTTWindowSwitcherItemHeight: 30,
BTTWindowSwitcherWidth: 380,
BTTWindowSwitcherOverrideDefaultShortcuts: false,
BTTWindowSwitcherShowThumbnail: 1,
BTTWindowSwitcherExcludeHiddenAndMinimizedWindows: false,
BTTWindowSwitcherDisableMouseHover: false,
BTTWindowSwitcherExcludeAllButHiddenAndMinimizedWindows: false,
BTTWindowSwitcherSelectNextOnRepeat: true,
BTTWindowSwitcherExcludeSpecific: true,
BTTWindowSwitcherInitialFocus: 0,
BTTWindowSwitcherTriggerOnRelease: false,
BTTWindowSwitcherFocus: 0,
BTTWindowSwitcherShowPopover: 0,
BTTWindowSwitcherAppearance: 0,
BTTWindowSwitcherExcludeVisibleWindows: false,
BTTWindowSwitcherFontSize: 12,
BTTWindowSwitcherExclude: `^(?!${hoveredDockAppName}-).*$`,
BTTWindowSwitcherSort: 0,
BTTWindowSwitcherExcludeWindowsFromOtherSpaces: false,
BTTWindowSwitcherMousePos: 0
}
}),
wait_for_reply: true
});
return result;
}