Author |
Topic |
|
neo
17 Posts |
Posted - 02/23/2012 : 08:49:19
|
acSetTopmost not work, I am wrong? [url=http://www.freeimagehosting.net/bie5d][/url] |
|
Rob
USA
2615 Posts |
Posted - 02/23/2012 : 09:05:53
|
I can't see your picture, it's too small. Perhaps just paste the script here instead. I tested acSetTopmost and it works for me. Of course, there's always the possibility that some apps create windows in a way which makes it difficult to perform this. Try with Notepad to see if it's working...though post the script here first. |
|
|
neo
17 Posts |
Posted - 02/23/2012 : 21:12:17
|
acSetTopmost(hwndTarget, x, y)
x, y must specify it? sometime I need set current active window to top. |
|
|
Rob
USA
2615 Posts |
Posted - 02/23/2012 : 21:14:28
|
acSetTopmost(nil, gsx, gsy) |
|
|
neo
17 Posts |
Posted - 02/23/2012 : 21:21:53
|
ok, thanks! |
|
|
Rob
USA
2615 Posts |
Posted - 02/23/2012 : 21:35:41
|
On my phone, that's the short response. You may want to use acToggleTopmost(nil,gsx,gsy). This will switch between topmost and normal. acSetTopmost makea it topmost only, doesn't turn topmost off. |
|
|
neo
17 Posts |
Posted - 02/23/2012 : 21:53:01
|
UnTop = acClearTopmost(nil, gsx, gsy) also be used. acToggleTopmost much better, thanks a lot! |
|
|
Rob
USA
2615 Posts |
Posted - 02/23/2012 : 23:07:38
|
Ok, I'm back home now and can explain in more detail about the action function usage.
The Insert button only inserts a template of the function, not one that is code-ready as I cannot know what you're intending to do. For example, acSetTopmost can accept either the handle to a window (hwndTarget, a number) OR the X,Y coordinates to locate the window. If hwndTarget (target window handle) is NULL, which in Lua is represented as nil, that tells StrokesPlus to use the X,Y coordinates to find the window handle and perform the action.
But in your call, nothing was specified, hwndTarget, x, and y weren't a number nor assigned any value at all. When S+ fires an action, several variables are automatically passed into every script, such as gsx (Gesture Start X) and gsy (Gesture Start Y).
So acSetTopmost(nil, gsx, gsy) instructs the action to locate the window under the mouse where the gesture started and set it to topmost.
Make sense? |
|
|
neo
17 Posts |
Posted - 02/24/2012 : 08:41:54
|
Very detailed =) I set down in the notebook. Thank you again.
Oh man |
|
|
|
Topic |
|
|
|