acPreviousApplication() is the closest to an Alt+Tab function in S+.
However, I use this quite regularly with good results; it lets me scroll up or down through all main windows.
So I click and hold the right button, click Left once, then scroll the mouse wheel up or down to "tab" through all open applications.
Global Lua:
Add these for use by the Actions
bTaskMode = 0
iTaskCount = 0
iTaskPosition = 0
Cycle Apps Down Action:
No Gesture specified, Left Button and Scroll Down modifiers, with Fire Recognition on Mouse Wheel Scroll* enabled in Preferences
if bTaskMode == 0 then
bTaskMode = 1
acGetAllWindows(1)
for num, handle in pairs(sp_all_windows) do
iTaskCount = iTaskCount + 1
end
end
local iStartingPosition = iTaskPosition
::top::
iTaskPosition = iTaskPosition + 1
if iTaskPosition >= iTaskCount then
iTaskPosition = 0
end
--get the window class to test for excluded windows
local sClass = acGetClassName(sp_all_windows[iTaskPosition],0,0)
--exclude these windows
if sClass ~= "SearchPane" and sClass ~= "Shell_CharmWindow"
and sClass ~= "ImmersiveLauncher" and sClass ~= "Snapped Desktop"
and sClass ~= "ImmersiveBackgroundWindow"
and sClass ~= "NativeHWNDHost"
and sClass ~= "MetroGhostWindow" then
--if the window is minimized, restore it
if aIsIconic(sp_all_windows[iTaskPosition]) ~= 0 then
acRestoreWindow(sp_all_windows[iTaskPosition])
end
--activate the window
acActivateWindow(sp_all_windows[iTaskPosition])
else
--the line below ensures the script won't get
--stuck in a recursive loop
--if there are only excluded windows present
if iTaskPosition ~= iStartingPosition then
goto top
end
end
Cycle Apps Up Action:
No Gesture specified, Left Button and Scroll Up modifiers, with Fire Recognition on Mouse Wheel Scroll* enabled in Preferences
if bTaskMode == 0 then
bTaskMode = 1
acGetAllWindows(1)
for num, handle in pairs(sp_all_windows) do
iTaskCount = iTaskCount + 1
end
end
local iStartingPosition = iTaskPosition
::top::
iTaskPosition = iTaskPosition - 1
if iTaskPosition < 0 then
iTaskPosition = iTaskCount-1
end
--get the window class to test for excluded windows
local sClass = acGetClassName(sp_all_windows[iTaskPosition],0,0)
--exclude these windows
if sClass ~= "SearchPane" and sClass ~= "Shell_CharmWindow"
and sClass ~= "ImmersiveLauncher" and sClass ~= "Snapped Desktop"
and sClass ~= "ImmersiveBackgroundWindow"
and sClass ~= "NativeHWNDHost"
and sClass ~= "MetroGhostWindow" then
--if the window is minimized, restore it
if aIsIconic(sp_all_windows[iTaskPosition]) ~= 0 then
acRestoreWindow(sp_all_windows[iTaskPosition])
end
--activate the window
acActivateWindow(sp_all_windows[iTaskPosition])
else
--the line below ensures the script won't get
--stuck in a recursive loop
--if there are only excluded windows present
if iTaskPosition ~= iStartingPosition then
goto top
end
end