AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WindowPad - multi-monitor window-moving tool
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Lexikos



Joined: 17 Oct 2006
Posts: 2472
Location: Australia, Qld

PostPosted: Sun Sep 23, 2007 2:41 am    Post subject: Reply with quote

I can see that would have use, but currently all of the pad keys will potentially move to another monitor. To (badly) visualize:
Code:
-------------
| 7 | 8 | 9 |
-------------
| 4 |   | 6 |
-------------
| 1 | 2 | 3 |
-------------

If you have a monitor diagonally down and right from your primary monitor, for example, Numpad3 will move a window to it. If you don't have any monitor above that (to the right of the primary), Numpad6 will not work.
Code:


    -----
    |   |
    ---------
        | 3 |
        -----
I will consider adding it as an optional feature. (Most likely after v2.)
Back to top
View user's profile Send private message
ezuk



Joined: 04 Jun 2005
Posts: 118

PostPosted: Sun Sep 23, 2007 8:01 am    Post subject: Reply with quote

lexikos wrote:
I can see that would have use, but currently all of the pad keys will potentially move to another monitor. To (badly) visualize:

I will consider adding it as an optional feature. (Most likely after v2.)


I see what you're saying. Thanks for considering it, though!
Back to top
View user's profile Send private message
Juonio
Guest





PostPosted: Sat Oct 06, 2007 10:31 am    Post subject: Error when loading WindowPad Reply with quote

Hey,

I would like to test WindowPad. I copy and pasted it to my editor and saved it as .AHK file but when I run it with AutoHotkey.exe it gives me an error.

----------------------------------
Error at line 159.

Line Text: :
Error: The first character above is illegal in an expression.

The program will exit.
----------------------------------

This is somehow similar as topic:
http://www.autohotkey.com/forum/topic6422-15.html

Copy and paste works fine in some other scripts. Can anybody help me? Can I get WindowPad in downloadable .AHK file somewhere?
Back to top
Juonio
Guest





PostPosted: Sat Oct 06, 2007 10:53 am    Post subject: Problem solved Reply with quote

I had an old version of AutoHotkey. It didn't understand ternary operators. I installed the newest version and it works fine. Looks great!
Back to top
BobA
Guest





PostPosted: Mon Oct 08, 2007 4:17 am    Post subject: Reply with quote

lexicos - I ran across WindowPad yesterday, I have been looking for something like it. No luck until now, thank you!

I have made a sort of subversion, which supports grow/shrink of the active window in directions, using ctrl-win-numpadkeys. I can get things done with code, but my skills are horrible, and trying to follow your lead and style, I really learned a lot. I appreciate that too.

You may have been working on v2, but I hope you will not mind if I post my version to this thread? If you do, I will keep it. It is mainly a couple of short routines hooked in.

I am using two large monitors, 21" and 24" both the aame height, they are great.

Thanks,

BobA
Back to top
Lexikos



Joined: 17 Oct 2006
Posts: 2472
Location: Australia, Qld

PostPosted: Mon Oct 08, 2007 6:04 am    Post subject: Reply with quote

BobA wrote:
You may have been working on v2, but I hope you will not mind if I post my version to this thread?
Please do. Smile Quite a bit of work has been done on WindowPad since the last release, but I haven't yet added grow/shrink hotkeys.
Quote:
I am using two large monitors, 21" and 24" both the aame height, they are great.
5:4 and 8:5, I guess? My setup is similar, but 19" and 22". Smile
Back to top
View user's profile Send private message
BobA
Guest





PostPosted: Mon Oct 08, 2007 12:10 pm    Post subject: Reply with quote

Thanks. The prices are really coming down, you can get a 24" for around $400. Very Happy

Here is my subversion. If you can use any of it you are welcome to.

Code:

; WindowPad:
;
;   Move and resize windows with Win+Numpad.
;     Win+Numpad1 = Fill bottom-left quarter of screen
;     Win+Numpad2 = Fill bottom half of screen
;     etc.
;
;   Move windows across monitors. For example:
;     Win+Numpad4 places the window on the left half of the screen.
;     Win+Numpad4 again moves it to the monitor to the right.
;
;   Quick monitor switch:
;     Win+Numpad5 places the window in the center of the screen.
;     Win+Numpad5 again moves the window to the next monitor.
;     (This works by monitor number, not necessarily left to right.)
;
;   QUICKER Monitor Switch:
;     Win+NumpadDot switches to the next monitor (1->2->3->1 etc.)
;     Win+NumpadDiv moves ALL windows to monitor 2.
;     Win+NumpadMult moves ALL windows to monitor 1.
;
;   Other shortcuts:
;     Win+Numpad0 toggles maximize.
;     Insert (or some other key) can be used in place of "Win".
;
; Credits:
;   Concept based on HiRes Screen Splitter by JOnGliko.
;   Written from scratch by Lexikos to support multiple monitors.
;   NumpadDot key functionality suggested by bobbo.
;
; Built with AutoHotkey v1.0.47.02
;
; HISTORY
;


;
; Subversion - BobA - ctrl-win-numpad digits shrink/grow windows
; ctrl-win-+/- to set shrink/grow mode - ctrl-win-/ to disable
; 8 Oct 2007

; Version 1.14:
;   - Fixed modifier+EasyKey combos losing their native functions.
;
; Version 1.13:
;   - Applied bobbo's hack for moving maximized windows.
;
; Version 1.12:
;   - Added two methods to exclude windows from GatherWindows():
;       GatherExclude window group (exclude by title, class, etc.)
;       ProcessGatherExcludeList (exclude by process name)
;
; Version 1.11:
;   - Fixed compatiblity issue with screens that don't align at the top.
;
; Version 1.1:
;   - "Gather windows" hotkeys (NumpadDiv and NumpadMult)
;   - NumpadDot to move window to next monitor
;   - Added more EasyKey combos (for symmetry)
;   - Original functionality of EasyKey is retained (on key-release)
;   - SetWinDelay, -1 to reduce lag when making multiple moves (quickly)
;
; Version 1:
;   - intial release


WindowPadInit:
; Exclusion examples:
GroupAdd, GatherExclude, ahk_class SideBar_AppBarWindow
; These two come in pairs for the Vista sidebar gadgets:
GroupAdd, GatherExclude, ahk_class SideBar_HTMLHostWindow   ; gadget content
GroupAdd, GatherExclude, ahk_class BasicWindow              ; gadget shadow/outline

; Comma-delimited list of processes to exclude.
;ProcessGatherExcludeList = sidebar.exe

; (ProcessGatherExcludeList excludes ALL windows belonging to those processes,
;  including windows you may not want to exclude, like the sidebar config window.)

Prefix_Active = #   ; Win+Numpad      = Move active window
Prefix_Other  = #!  ; Alt+Win+Numpad  = Move previously active window
Prefix_Third = ^#   ; Ctrl+Win+Numpad = Shrink or Expand Active Window                      ; <<
; all shrink & expand functions require Ctrl+Win
; Ctrl+Win+NumpadMult enables / Ctrl+Win+NumpadDiv disables
; Ctrl+Win+NumpadPlus sets expand mode / Ctrl+Win+NumpadSub sets shrink mode
; Ctrl+Win plus Numpad digit (arrow) keys do the expanding or shrinking
; Ctrl+Win+5 currently does nothing - might shrink/grow in all directions at once



; Note: Shift (+) should not be used, as +Numpad is hooked by the OS
;   to do left/right/up/down/etc. (reverse Numlock) -- at least on Vista.

EasyKey = Insert    ; Insert is near Numpad on my keyboard...

; Note: Prefix_Other must not be a sub-string of Prefix_Active.
;       (If you want it to be, first edit the line "if (InStr(A_ThisHotkey, Prefix_Other))")

; Width and Height Factors for Win+Numpad5 (center key.)
CenterWidthFactor   = 0.9
CenterHeightFactor  = 0.9

ShrinkExpandEnabled := true   ; change to false if never want this feature                     ; <<
                              ; currently hotkeys registered anyway & turned off
ShrinkExpandSwitch := true    ; start assuming expand                                          ; <<
StepSize = 32      ; shrink/grow in pixels was originally a divisor of monwidth & monheight
                   ; double or quadruple it for quicker stepping (untested)         

Hotkey, IfWinActive ; in case this is included in another script...

Loop, 9
{   ; Register hotkeys.
    Hotkey, %Prefix_Active%Numpad%A_Index%, DoMoveWindowInDirection
    Hotkey, %Prefix_Other%Numpad%A_Index%, DoMoveWindowInDirection
    ; OPTIONAL
    if EasyKey
        Hotkey, %EasyKey% & Numpad%A_Index%, DoMoveWindowInDirection
}
Hotkey, %Prefix_Active%Numpad0, DoMaximizeToggle
Hotkey, %Prefix_Other%Numpad0, DoMaximizeToggle

Hotkey, %Prefix_Third%NumpadAdd, ShrinkExpandSwitch                                         ; <<
Hotkey, %Prefix_Third%NumpadSub, ShrinkExpandSwitch                     
Hotkey, %Prefix_Third%NumpadMult, ShrinkExpandEnable                   
Hotkey, %Prefix_Third%NumpadDiv, ShrinkExpandDisable                   
  Loop, 9                                                               
   Hotkey, %Prefix_Third%Numpad%a_Index%, DoMoveWindowInDirection       


If !ShrinkExpandEnabled                                                       
    GoSub, ShrinkExpandDisable

Hotkey, %Prefix_Active%NumpadDot, MoveWindowToNextScreen
Hotkey, %Prefix_Other%NumpadDot, MoveWindowToNextScreen

Hotkey, %Prefix_Active%NumpadDiv, GatherWindowsLeft
Hotkey, %Prefix_Active%NumpadMult, GatherWindowsRight

if (EasyKey) {
    Hotkey, %EasyKey% & Numpad0, DoMaximizeToggle
    Hotkey, %EasyKey% & NumpadDot, MoveWindowToNextScreen
    Hotkey, %EasyKey% & NumpadDiv, GatherWindowsLeft
    Hotkey, %EasyKey% & NumpadMult, GatherWindowsRight
    Hotkey, *%EasyKey%, SendEasyKey ; let EasyKey's original function work (on release)
}
return



SendEasyKey:
    Send {Blind}{%EasyKey%}
    return

; This is actually based on monitor number, so if your secondary is on the
; right, you may want to switch these around.
GatherWindowsLeft:
    GatherWindows(2)
    return
GatherWindowsRight:
    GatherWindows(1)
    return



; Hotkey handler.
DoMoveWindowInDirection:
       
    DoMoveWindowInDirection()
    return


   


DoMoveWindowInDirection()
{
    local dir, dir0, dir1, dir2, widthFactor, heightFactor
   
    ; Define constants.
    if (!Directions1) {
        dir = -1:+1,0:+1,+1:+1,-1:0,0:0,+1:0,-1:-1,0:-1,+1:-1
        StringSplit, Directions, dir, `,
    }

    gosub WP_SetLastFoundWindowByHotkey
   
    ; Determine which direction we want to go.
    if (!RegExMatch(A_ThisHotkey, "\d+", dir) or !Directions%dir%)
    {
        MsgBox Error: "%A_ThisHotkey%" was registered and I can't figure out which number it is!
        return
    }


    dir := Directions%dir%
    StringSplit, dir, dir, :
   
    ; Determine width/height factors.
    if (dir1 or dir2) { ; to a side
        widthFactor  := dir1 ? 0.5 : 1.0
        heightFactor := dir2 ? 0.5 : 1.0
    } else {            ; to center
        widthFactor  := CenterWidthFactor
        heightFactor := CenterHeightFactor
    }
   
    ; Move the window!
    MoveWindowInDirection(dir1, dir2, widthFactor, heightFactor)
}
return

WP_SetLastFoundWindowByHotkey:
    ; Set Last Found Window.
    if (InStr(A_ThisHotkey, Prefix_Other))
        WinPreviouslyActive()
    else
        WinExist("A")
return

; "Maximize"
DoMaximizeToggle:
    MaximizeToggle()
return
   
MaximizeToggle()
{
    gosub WP_SetLastFoundWindowByHotkey
    WinGet, state, MinMax
    if state
        WinRestore
    else
        WinMaximize
}

ShrinkExpandEnable:                                                                          ; <<
  If !ShrinkExpandEnabled {         
      Hotkey, %Prefix_Third%NumpadAdd, On
      Hotkey, %Prefix_Third%NumpadSub, On
      Hotkey, %Prefix_Third%NumpadDiv, On
      Loop, 9
        Hotkey, %Prefix_Third%Numpad%a_Index%, On
      ShrinkExpandEnabled := true
  }
  return
 
ShrinkExpandDisable:                                                                        ; <<   
      Hotkey, %Prefix_Third%NumpadAdd, Off
      Hotkey, %Prefix_Third%NumpadSub, Off
      Hotkey, %Prefix_Third%NumpadDiv, Off
      Loop, 9
        Hotkey, %Prefix_Third%Numpad%a_Index%, Off
      ShrinkExpandEnabled := false
      return                                                                             
 
; Ctrl+Win+Numpad minus sets shrink mode                                                    ; << 
; Ctrl+Win+Numpad plus sets expand mode
ShrinkExpandSwitch:                                                                         
  If Instr(a_ThisHotkey,"NumpadSub")
    ShrinkExpandSwitch := false
  Else If Instr(a_ThisHotkey,"NumpadAdd")
    ShrinkExpandSwitch := true
  return                                                                                     


; Does the grunt work of the script.
MoveWindowInDirection(sideX, sideY, widthFactor, heightFactor, screenMoveOnly=false)
{
    global ShrinkExpandSwitch, StepSize                                                    ; <<
    WinGetPos, x, y, w, h

    ; Determine which monitor contains the center of the window.
    m := GetMonitorAt(x+w/2, y+h/2)
   
    ; Get work area of active monitor.
    gosub CalcMonitorStats
    ; if ctrl is pressed, do the resize functions
    If (GetKeyState("Control","P"))                                                        ; <<
    {
        If ShrinkExpandSwitch
            GoSub, ExpandWindow
        Else
            GoSub, ShrinkWindow
    }   
    Else     
    { ;  Otherwise, do the move routines
      ; Calculate possible new position for window.
      gosub CalcNewPosition
   


    ; If the window is already there,
    if (newx "," newy "," neww "," newh) = (x "," y "," w "," h)
    {   ; ..move to the next monitor along instead.
   
        if (sideX or sideY)
        {   ; Move in the direction of sideX or sideY.
            SysGet, monB, Monitor, %m% ; get bounds of entire monitor (vs. work area)
            x := (sideX=0) ? (x+w/2) : (sideX>0 ? monBRight : monBLeft) + sideX
            y := (sideY=0) ? (y+h/2) : (sideY>0 ? monBBottom : monBTop) + sideY
            newm := GetMonitorAt(x, y, m)
        }
        else
        {   ; Move to center (Numpad5)
            newm := m+1
            SysGet, mon, MonitorCount
            if (newm > mon)
                newm := 1
        }
   
        if (newm != m)
        {   m := newm
            ; Move to opposite side of monitor (left of a monitor is another monitor's right edge)
            sideX *= -1
            sideY *= -1
            ; Get new monitor's work area.
            gosub CalcMonitorStats
        }
        ; Calculate new position for window.
        gosub CalcNewPosition
    }
   }                                                      ; end of the 'if ctrl is pressed / else'

    ; Restore before resizing...
    WinGet, state, MinMax
    if state
        WinRestore

    ; Finally, move the window!
    SetWinDelay, -1
    WinMove,,, newx, newy, neww, newh
   
    return
 
 

CalcNewPosition:
    ; Calculate new size.
    if (IsResizable()) {
        neww := Round(monWidth * widthFactor)
        newh := Round(monHeight * heightFactor)
    } else {
        neww := w
        newh := h
    }
    ; Calculate new position.
    newx := Round(monLeft + (sideX+1) * (monWidth  - neww)/2)
    newy := Round(monTop  + (sideY+1) * (monHeight - newh)/2)
    return

ExpandWindow:                                                                           ; <<
      If IsResizable()   {
        newX := (SideX<0) ? (x-StepSize >= monLeft) ? x-StepSize : monLeft : x
        newY := (SideY<0) ? (y-StepSize >= monTop) ? y-StepSize : monTop : y
        newW := (SideX>0) ? (x+w+StepSize <= monRight) ? w+StepSize : monRight-x : w-newX+x
        newH := (SideY>0) ? (y+h+StepSize <= monBottom) ? h+StepSize : monBottom-y : h-newY+y
      }
      return
     
ShrinkWindow:                                                                            ; <<
  If IsResizable()  {
        newX := (SideX>0) ? (w > 320) ? x+StepSize : x : x
        newY := (SideY>0) ? (h > 240) ? y+stepSize : y : y
        newW := (SideX<0) ? (w > 320) ? w-StepSize : w : x+w-newX
        newH := (SideY<0) ? (h > 240) ? h-StepSize : h : y+h-newY
  }
  return                                                                               ;  I'm done


CalcMonitorStats:
    ; Get work area (excludes taskbar-reserved space.)
    SysGet, mon, MonitorWorkArea, %m%
    monWidth  := monRight - monLeft
    monHeight := monBottom - monTop
    return
}

; Get the index of the monitor containing the specified x and y co-ordinates.
GetMonitorAt(x, y, default=1)
{
    SysGet, m, MonitorCount
    ; Iterate through all monitors.
    Loop, %m%
    {   ; Check if the window is on this monitor.
        SysGet, Mon, Monitor, %A_Index%
        if (x >= MonLeft && x <= MonRight && y >= MonTop && y <= MonBottom)
            return A_Index
    }

    return default
}

IsResizable()
{
    WinGet, Style, Style
    return (Style & 0x40000) ; WS_SIZEBOX
}

; Note: This may not work properly with always-on-top windows. (Needs testing)
WinPreviouslyActive()
{
    active := WinActive("A")
    WinGet, win, List

    ; Find the active window.
    ; (Might not be win1 if there are always-on-top windows?)
    Loop, %win%
        if (win%A_Index% = active)
        {
            if (A_Index < win)
                N := A_Index+1
           
            ; hack for PSPad: +1 seems to get the document (child!) window, so do +2
            ifWinActive, ahk_class TfPSPad
                N += 1
           
            break
        }

    ; Use WinExist to set Last Found Window (for consistency with WinActive())
    return WinExist("ahk_id " . win%N%)
}


;
; Switch without moving/resizing (relative to screen)
;
MoveWindowToNextScreen:
    gosub WP_SetLastFoundWindowByHotkey
    WinGet, state, MinMax
    if state = 1
    {   ; Maximized windows don't move correctly on XP
        ; (and possibly other versions of Windows)
        WinRestore
        MoveWindowToNextScreen()
        WinMaximize
    }
    else
        MoveWindowToNextScreen()
return

MoveWindowToNextScreen()
{
    WinGetPos, x, y, w, h
   
    ; Determine which monitor contains the center of the window.
    ms := GetMonitorAt(x+w/2, y+h/2)
   
    ; Determine which monitor to move to.
    md := ms+1
    SysGet, mon, MonitorCount
    if (md > mon)
        md := 1
   
    ; This may happen if someone tries it with only one screen. :P
    if (md = ms)
        return

    ; Get source and destination work areas (excludes taskbar-reserved space.)
    SysGet, ms, MonitorWorkArea, %ms%
    SysGet, md, MonitorWorkArea, %md%
    msw := msRight - msLeft, msh := msBottom - msTop
    mdw := mdRight - mdLeft, mdh := mdBottom - mdTop
   
    ; Calculate new size.
    if (IsResizable()) {
        w *= (mdw/msw)
        h *= (mdh/msh)
    }
    SetWinDelay, -1
    ; Move window, using resolution difference to scale co-ordinates.
    WinMove,,, mdLeft + (x-msLeft)*(mdw/msw), mdTop + (y-msTop)*(mdh/msh), w, h
}


;
; "Gather" windows on a specific screen.
;

GatherWindows(md=1)
{
    global ProcessGatherExcludeList
   
    SetWinDelay, -1 ; Makes a BIG difference to perceived performance.
   
    ; List all visible windows.
    WinGet, win, List
   
    ; Copy bounds of all monitors to an array.
    SysGet, mc, MonitorCount
    Loop, %mc%
        SysGet, mon%A_Index%, MonitorWorkArea, %A_Index%
   
    ; Destination monitor
    mdx := mon%md%Left
    mdy := mon%md%Top
    mdw := mon%md%Right - mdx
    mdh := mon%md%Bottom - mdy
   
    Loop, %win%
    {
        ; If this window matches the GatherExclude group, don't touch it.
        if (WinExist("ahk_group GatherExclude ahk_id " . win%A_Index%))
            continue
       
        ; Set Last Found Window.
        if (!WinExist("ahk_id " . win%A_Index%))
            continue

        WinGet, procname, ProcessName
        ; Check process (program) exclusion list.
        if procname in %ProcessGatherExcludeList%
            continue
       
        WinGetPos, x, y, w, h
       
        ; Determine which monitor this window is on.
        xc := x+w/2, yc := y+h/2
        ms := 1
        Loop, %mc%
            if (xc >= mon%A_Index%Left && xc <= mon%A_Index%Right
                && yc >= mon%A_Index%Top && yc <= mon%A_Index%Bottom)
            {
                ms := A_Index
                break
            }
        ; If already on destination monitor, skip this window.
        if (ms = md)
            continue
       
        ; Source monitor
        msx := mon%ms%Left
        msy := mon%ms%Top
        msw := mon%ms%Right - msx
        msh := mon%ms%Bottom - msy
       
        ; If the window is resizable, scale it by the monitors' resolution difference.
        if (IsResizable()) {
            w *= (mdw/msw)
            h *= (mdh/msh)
        }
   
        WinGet, state, MinMax
        if state = 1
            WinRestore
       
        ; Move window, using resolution difference to scale co-ordinates.
        WinMove,,, mdx + (x-msx)*(mdw/msw), mdy + (y-msy)*(mdh/msh), w, h

        if state = 1
            WinMaximize
    }
}


Back to top
A Stan
Guest





PostPosted: Thu Oct 11, 2007 2:55 am    Post subject: Superb Script! Reply with quote

Hey lexikos:

Thanks for the superb utility. Appreciated.

Al
Back to top
Ktafil
Guest





PostPosted: Fri Nov 02, 2007 9:07 pm    Post subject: Custom key Reply with quote

Wow, this is a great script.
Unfortunately i am a laptop user so i only have a numpad when docked in a dockingstation.
I would also like to use it when I do presentations on a beamer or when watching a movie on the S/video out.
So I would like to use different keys to do all `numpad actions´
I read on page 3 that you implemented it in an .INI file, but I am a newby so i did not get it to work, i need some help with that
Maybe somebody can share their working script and a working .INI file so a can modify it to my convinience?
I do not need the fancy GUI, would be nice, but an INI would do the job for me.

Thank you and keep up the good work!
Back to top
Lexikos



Joined: 17 Oct 2006
Posts: 2472
Location: Australia, Qld

PostPosted: Fri Nov 02, 2007 11:14 pm    Post subject: Re: Custom key Reply with quote

Ktafil wrote:
i I read on page 3 that you implemented it in an .INI file,
I haven't released that version yet. The GUI needs more work, but I guess I'll release the script itself later today.
Back to top
View user's profile Send private message
randhirv
Guest





PostPosted: Fri Nov 02, 2007 11:32 pm    Post subject: Change hotkeys from num pad Reply with quote

I am using an ergo keyboard that does not have the numpad, so I am trying to change the currently assigned hotkeys -any suggestions on the easiest way to do this?
Back to top
Lexikos



Joined: 17 Oct 2006
Posts: 2472
Location: Australia, Qld

PostPosted: Sat Nov 03, 2007 2:19 am    Post subject: Reply with quote

Download the latest beta from the link (I just put) in my original post. Hotkeys are customized via WindowPad.ini. The ini file is less than intuitive, but hopefully there are enough examples to demonstrate how things work. The default keys allow one-handed window moves with either CapsLock (and letter keys) or the Numpad (Numpad0 and NumpadDot are triggers.)

Most commands have a WinTitle parameter which can be either A (active window), P (the window under it), M (the window under the mouse cursor), or a window title such as Untitled - Notepad or ahk_class Notepad. For GatherWindows, you can specify either a WinTitle (to gather all windows on the same monitor as the window) or a one-based monitor number.

(This will all either be explained in the GUI, or be made completely obvious by intuitive graphical controls.)
Back to top
View user's profile Send private message
Ktafil
Guest





PostPosted: Sat Nov 03, 2007 11:25 am    Post subject: Reply with quote

Thanks, just super!
Works fine for me, now i can change the keys to whatever i want!

Still curious about the GUI, but for me, fancy enough.
Back to top
hps



Joined: 19 Aug 2005
Posts: 14
Location: Germany

PostPosted: Sun Nov 04, 2007 1:01 pm    Post subject: Reply with quote

Great, really great.
Just played around with "M - Windows under cursor".
At least this mode would need a "mouse follows window" feature.

Quick and dirty :

Code:

    ; Finally, move the window!
    SetWinDelay, 0
    WinMove,,, newx, newy, neww, newh
    Coordmode,Mouse,Screen
    MouseMove,% newx+neww/2,% newy+newh/2,0


using "a = WindowPadMove, -1, 0, 0.5, 1.0" the window moves to the next monitor.
using "q = WindowPadMove, -1, -1, 0.5, 0.5" or "z = WindowPadMove, -1, +1, 0.5, 0.5" this does not work
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 2472
Location: Australia, Qld

PostPosted: Sun Nov 04, 2007 4:00 pm    Post subject: Reply with quote

hps wrote:
At least this mode would need a "mouse follows window" feature.
My original use for 'M' was to "throw" windows out of the way (using wheel tilt), so I definitely wouldn't want the mouse moving with it. Perhaps I'll add an extra option for it. In fact, it would be useful to have a general option to move the mouse with the window (keeping the mouse in the same relative position.)
Quote:
using "a = WindowPadMove, -1, 0, 0.5, 1.0" the window moves to the next monitor.
using "q = WindowPadMove, -1, -1, 0.5, 0.5" or "z = WindowPadMove, -1, +1, 0.5, 0.5" this does not work
This has already been discussed. It is not intended to move to the next monitor - it is intended to move in the direction you press. If there is a monitor up and to the left (q) or down and to the left (z), it will "work." I might eventually change it to "slide" along the edge of the virtual screen (the bounding rectangle of all monitors.)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 4 of 7

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group