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, 8
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Rhetticus



Joined: 12 Jul 2008
Posts: 1
Location: Australia

PostPosted: Sat Jul 12, 2008 4:43 pm    Post subject: Reply with quote

I have created new taskbar icons for use with this program and thought that I should share it with you.

Preview of new tray icon (left-most icon):

Download here:
http://www.esnips.com/doc/72257248-9218-41a3-95dd-ece3d51eed28/tray3

Preview of new disabled icon(left-most icon):

Download here:
http://www.esnips.com/doc/e3a242e7-2292-494e-8ffd-3385ff77714c/disabled2

As for installation simply place the new icons into the "icons" folder where "WindowPad" is kept. Then in the "WindowPad.ahk" script replace the line:
icon := is_enabled ? "tray.ico" : "disabled.ico"
With:
icon := is_enabled ? "tray3.ico" : "disabled2.ico"
Back to top
View user's profile Send private message
Max99



Joined: 10 Jul 2008
Posts: 3

PostPosted: Sat Jul 12, 2008 9:46 pm    Post subject: Reply with quote

Lexikos wrote:
...which functions did you try? WindowPad originally used Win+Numpad, but the latest version uses Numpad0/NumpadDot+Numpad or Capslock+q/w/e/a/s/d/z/x/c. If I download the latest version and extract it somewhere, it Just Works.


Problem solved as I must somehow have missed the fact that the Windows key is no longer the operator key. Now all working fine and exactly what I need (and more) to replace the buggy nView software. Will also definitely now try to use AutoHotkey for other applications.

Many thanks for help and for a great little utility.
Back to top
View user's profile Send private message
HelgeFin



Joined: 04 Apr 2007
Posts: 8

PostPosted: Fri Aug 29, 2008 8:15 pm    Post subject: Reply with quote

I used WindowPad for some time, thanks a lot, but now I found something with the same functionality and much more good stuff:

SplitMon
http://www.autoitscript.com/forum/index.php?showtopic=39050
Back to top
View user's profile Send private message
Lexikos



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

PostPosted: Sat Aug 30, 2008 3:12 am    Post subject: Reply with quote

Thanks for posting, HelgeFin. Here are my biased findings after a quick try:
  • Redirect maximize is an interesting idea, but not so useful in practice if you must click the maximize button. It is too small to be efficient - I use a mouse gesture instead.
  • The WinMove features do not seem applicable to single-monitor set-ups, or they simply don't work on my system.
  • WinMem might be useful to some, but I probably wouldn't use it.
  • WinResize (multi-window resizer) is excellent. Smile ezuk requested similar hotkey-based functionality a while back, but I never got around to implementing it.
Interestingly, the GUI paints very slowly when Aero is enabled (on Vista). This does not happen with AutoHotkey GUIs.
Back to top
View user's profile Send private message
HelgeFin



Joined: 04 Apr 2007
Posts: 8

PostPosted: Sat Aug 30, 2008 1:16 pm    Post subject: Reply with quote

You are right,

Lexikos wrote:
WinResize (multi-window resizer) is excellent. Smile


It is the killer feature. That alone makes it worth having that program running.
Back to top
View user's profile Send private message
deepfriedcheese



Joined: 04 Jul 2008
Posts: 3

PostPosted: Wed Sep 03, 2008 1:58 pm    Post subject: WinMove in Windowpad Reply with quote

I monkeyed with the windowpad code to get something like the WinMove feature in splitmon some time ago. I use a five monitor setup in my office and a two or three monitor system at client's offices. The software for the nVidia card in my docking station included this function, but I wanted it while in the field without the dock.

I inserted the following lines in the code:
Code:
Prefix_Alternate  = #^  ; Ctrl+Win+Numpad = Move window directly to a monitor

Defined at the same time as the other prefixes.

Code:
Hotkey, %Prefix_Alternate%Numpad%A_Index%, DoMoveWindowToMonitor

In the loop registering hotkeys.

Code:
;
; Move window directly to monitor number selected without resizing (relative to screen).
;

DoMoveWindowToMonitor:
    gosub WP_SetLastFoundWindowByHotkey
    WinGet, state, MinMax
    if state = 1
    {   ; Maximized windows don't move correctly on XP
        ; (and possibly other versions of Windows)
        WinRestore
        DoMoveWindowToMonitor()
        WinMaximize
    }
    else
        DoMoveWindowToMonitor()
return

DoMoveWindowToMonitor()
{
    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.
    StringRight, md, A_ThisHotkey, 1
    SysGet, mon, MonitorCount
    ; This may happen if someone tries to move to a monitor number that does not exist.
    if (md > mon)
        return
   
    ; 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
}

This is the routine that actually moves the window.

I also wanted to be able to move either direction with NumpadDot so I added this.

Code:
Hotkey, %Prefix_Alternate%NumpadDot, MoveWindowBackOneScreen

So I could easily move forward and back one screen using NumpadDot.

Code:
MoveWindowBackOneScreen:
    gosub WP_SetLastFoundWindowByHotkey
    WinGet, state, MinMax
    if state = 1
    {   ; Maximized windows don't move correctly on XP
        ; (and possibly other versions of Windows)
        WinRestore
        MoveWindowBackOneScreen()
        WinMaximize
    }
    else
        MoveWindowBackOneScreen()
return

MoveWindowBackOneScreen()
{
    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 < 1)
        md := mon
   
    ; 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
}

This is a barely modified version of the MoveWindowToNextScreen to move it back instead.

I looked at the splitmon page, but I didn't try it out. I don't get what the WinResize actually does.

Lexikos, I hope you don't mind me posting the changes I've made. Windowpad is a great program that adds a big dose of efficiency to my days.
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, 8
Page 8 of 8

 
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