Author |
Topic |
|
Laskoloy
2 Posts |
Posted - 09/07/2013 : 20:52:15
|
Hi there, I think there must be an easy solution for this, but I haven't got any idea about.. First of all, I've been always an StrokeIt user, but I've recently switched to SP, due to certain things. However, I can't work with StrokesPlus for inactivate windows in some shortcuts properly, like pasting and closing, it will close and paste text only in the activate (focused) window, not where the mouse is over through the screen, (Minimizing/Maximizing works perfectly in the other hand), I've uploaded a short video (http://tinypic.com/player.php?v=2a9yz3k&s=5) showing these differences, how StrokeIt and StrokesPlus work for these cases.. I would like SP to work like StrokeIt does, could you please help me to fix this?, thank you so much!
Details:
Paste: acSendKeys("^v") Close: acSendKeys("%{F_4}") System: Windows 8 - 64 bits |
|
Noesis
25 Posts |
Posted - 09/08/2013 : 00:28:07
|
You're right there is an easy solution, put simply SendKeys does exactly that, sends keys to what ever window would receive manual keyboard keystrokes so to get send keys to work on an inactive window you need that window to be activated as part of the gesture's action code. eg.
acActivateWindow(nil, gsx, gsy, 0) acDelay(100) -- Not always needed, see below. acSendKeys("^v")
The acDelay() is just to give windows a chance to activate the window as I've found sometimes without it the keys are still sent to the old window.
Also with regard to closing the window, while the above method should work, you could also just use acCloseApplication(nil,gsx,gsy) instead of sending the close hotkey "alt+F4" (especially since some apps actually don't use that key combo for closing).
|
|
|
Laskoloy
2 Posts |
Posted - 09/09/2013 : 14:53:26
|
Hey, thanks a lot! it worked so good :) I've just noticed something though, it's a bit slower than StrokeIt, it waits some miliseconds before perfoming the action (as compared to StrokeIt), it's not something really noticeable anyway, maybe making it 'faster' could be implemented for future versions, cheers! |
|
|
Rob
USA
2615 Posts |
Posted - 09/09/2013 : 18:57:29
|
StrokeIt will always be a little faster than S+ because it's not as complex nor flexible. SI fires immediate actions and doesn't have as many checks nor does it have to load up a Lua engine to fire the action scripts.
This makes SI more streamlined than S+, but not as flexible; so it's a trade off. |
|
|
|
Topic |
|
|
|