Home
Download
Screenshots

Wiki
Plugins
Translations
Developers
Donate

Forums/Help
Contact Us

StrokeIt

Windows 7 'Snap' help

Posted by Jamesa 
Windows 7 'Snap' help
March 25, 2011 05:50PM
I've been trying fruitlessly for the last hour or so to create a script to move a window right multiple times using the mousewheel to do the WIndows 7 Snap feature without having to move my mouse over that same window each time. (for info a video on what snap does please see http://windows.microsoft.com/en-US/windows7/products/features/snap)

Here's what I've tried

Attempt 1:
Move Win Right [Wheel Up] {
Win = keys, hotkey "[WIN_DOWN]
[WIN_UP]"
}

Attempt 2:
Move Win Right [Wheel Up] {
Win = keys, hotkey "[WIN_DOWN]
"
Wait = utilities, Delay "00"
Win = keys, hotkey "[WIN_UP]"
}

Attempt 1 works 1 time. It moves the window once, but won't keep moving the same window (unless the mouse pointer is actually in a spot over the window).
Attempt 2 does about the same as attempt 1 but doesn't allow you to move programs underneath.

I guess my real question is is there a way to make Strokeit keep snapping the same window that is under the mouse pointer when I start doing the gesture (right click + wheel_up). (I.E. right click then spin the mouse wheel up multiple times and have it move that same first window)?

Also note sometimes I like using the snap feature with my web browser, sometimes notepad, sometimes adobe reader, so it's not always the same program I'm 'Snapping' to the right edge of my screen (or moving it to monitor #2). If that needs any clarification please let me know.
Re: Windows 7 'Snap' help
March 25, 2011 07:53PM
I'm afraid that's not possible since StrokeIt executes actions on window that is under the cursor (excep for Lua where you can search for a specific window or Send/Post Messages which also lets you target by class or title). Your method will work as long as you relocate the cursor to be over the window you want to move. I recommend you to combine StrokeIt with AHK (Auto Hotkey) for "ultimate power" :)

AHK is an extremely versatile tool that complements well to StrokeIt. It can do things with the "last active" window hence it can issue an Win+Right command to it.
By the way, snap is quite useful but Microsoft should implement "window inertia" as well so that you could throw the window and it would float in that direction until it hits the edge (and snaps). There would be no need to drag it across several displays :)
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 23 plus 21?
Message: