This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Register | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General Discussion
 General Discussion
 return alt+tab
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

chagui

14 Posts

Posted - 10/17/2014 :  15:01:10  Show Profile  Reply with Quote
Hi,
i tried to return the usefull alt+tab for switching application after a mouse gesture,
my try failed.. , is it possible ?
I hope because ur soft seems really awesome !

thanks for any help,
gui

chagui

14 Posts

Posted - 10/17/2014 :  15:13:05  Show Profile  Reply with Quote
just to be more accurate, i am on win 8.1 and i tried acSendKeys("^%{TAB}")
Go to Top of Page

chagui

14 Posts

Posted - 10/17/2014 :  15:25:27  Show Profile  Reply with Quote
seems work now but it doesn't reproduce the same as alt+tab , i mean with native alt+tab i can switch directly between 2 applications, and with the gesture it continue to select the next application, i cannot switching only with two; For developpement environement its problematic
Go to Top of Page

chagui

14 Posts

Posted - 10/17/2014 :  15:51:15  Show Profile  Reply with Quote
OK i made some progress its no more far away now, i understud whats wrong:
If you want to reproduce the human action alt+tab and switching only with two applications,
you have to release an alt final, this mean in fact the action should:
(alt+tab)( then release tab key) , (then release alt key) .
Is it possible to simulate release button like this ? im afraid answer is no..
Go to Top of Page

chagui

14 Posts

Posted - 10/17/2014 :  16:32:35  Show Profile  Reply with Quote
ok after many test.. its very strange because it appear i can reproduce exactly my need when i press Alt and Tab on my keyboard in same time and release both keys in same time, so i don't understand why acSendKeys("^%{TAB}")
doesn't work as wanted, perhaps the release state lacking, i don't konw..
If some guru can help, it will be warmly welcome..
a shortcut keyboard solution will be fine too.. Objectif is to perform the alt+tab by clicking only on one key, or with some mouse gesture;

hope my english is not too terrible..
gui
Go to Top of Page

Rob

USA
2606 Posts

Posted - 10/17/2014 :  16:38:16  Show Profile  Visit Rob's Homepage  Reply with Quote
The problem is that when you press Alt+Tab physically, Windows intercepts and handles the keyboard at that point in time; it takes control away from the application.

When you inject that keystroke (as is the case with S+), the first key sequence is received, but after that, Windows takes control of keyboard input and ignores any keystrokes from S+.
Go to Top of Page

chagui

14 Posts

Posted - 10/17/2014 :  16:46:54  Show Profile  Reply with Quote
Thnaks for help Rob,

I believe i understand, so there are no solutions at all for that right ?! :(
Go to Top of Page

Rob

USA
2606 Posts

Posted - 10/17/2014 :  16:59:18  Show Profile  Visit Rob's Homepage  Reply with Quote
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
Go to Top of Page

Rob

USA
2606 Posts

Posted - 10/17/2014 :  17:00:55  Show Profile  Visit Rob's Homepage  Reply with Quote
Ack! Also, add this to Global Lua (enable Allow After Release Script* in Preferences):
function sp_after_release()
	bTaskMode = 0
	iTaskCount = 0
	iTaskPosition = 0	
end
Go to Top of Page

chagui

14 Posts

Posted - 10/17/2014 :  17:11:58  Show Profile  Reply with Quote
great ! many thanks for your support
gui
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000