 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Andreone
Joined: 20 Jul 2007 Posts: 257 Location: Paris, France
|
Posted: Mon Nov 05, 2007 11:53 am Post subject: |
|
|
This is a very nice and helpful script. Thank you. It is now one that is started with Windows at my job
I found a little app called MultiArrows that adds a small arrow button in the caption bar of any windows, allowing to send the window to the next monitor.
majkinetor has wrote has example of how to add custom buttons in a caption bar TitleButton 0.31, so it should be easy.
Well, I wonder what you think about adding this to WindowPad?
This would be a nice feature, isn't it? |
|
| Back to top |
|
 |
randhirv Guest
|
Posted: Tue Nov 06, 2007 8:43 pm Post subject: unable to get this to work |
|
|
I am using the new beta and trying to edit the ini file. I am using an ergo keyboard that does not have the numeric keypad.
I am unsure about which hotkeys to change. I am trying to change just the section here:
| Quote: | [Hotkeys]
CapsLock = Hotkeys, Active Window (WADS)
Numpad0 = Hotkeys, Active Window (Numpad)
NumpadDot = Hotkeys, Previous Window (Numpad) |
and leave the rest unchanged. Is this the way to do it? I would love to use this program and the feedback seems great - so I hope I can get over this hurdle.
Thanks,
Randhir |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2492 Location: Australia, Qld
|
Posted: Wed Nov 07, 2007 3:43 am Post subject: |
|
|
The 'Hotkeys' pseudo-command enables, disables, or toggles a set of hotkeys.
The first parameter is the name of the [Hotkeys: ...] section which it acts on.
If the second parameter is omitted, the hotkey section is automatically disabled when you release the key. Otherwise, you can specify On, Off or Toggle (in fact, any string of options supported by the built-in Hotkey command should work.)
It is possible to define all of your shortcuts in the [Hotkeys] section - for example: | Code: | [Hotkeys]
#Numpad1 = WindowPadMove, -1, +1, 0.5, 0.5
#Numpad2 = WindowPadMove, 0, +1, 1.0, 0.5
#Numpad3 = WindowPadMove, +1, +1, 0.5, 0.5
...etc. | To make it easier to change the "prefix" key, I used the Hotkeys pseudo-command in the default config.
You'll need to change the [Hotkeys] section and corresponding [Hotkeys:...] sections. For instance, in the [Hotkeys: Active Window (Numpad)] section, replace the relevant Numpad keys with keys of your choosing. Then, in the [Hotkeys] section, change this line: | Code: | | Numpad0 = Hotkeys, Active Window (Numpad) | to change the prefix key. You may also want to edit the (Numpad) part of the section name for it to make sense. Alternately, you could create a new section. |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2492 Location: Australia, Qld
|
Posted: Wed Nov 07, 2007 3:56 am Post subject: |
|
|
| Andreone wrote: | I found a little app called MultiArrows that adds a small arrow button in the caption bar of any windows, allowing to send the window to the next monitor.
majkinetor has wrote has example of how to add custom buttons in a caption bar TitleButton 0.31, so it should be easy.
Well, I wonder what you think about adding this to WindowPad?
This would be a nice feature, isn't it? |
I would find it easier to just click anywhere on the titlebar and flick the window across... I don't think it really fits with the concept of "WindowPad", and since I'd personally never use it, I won't be implementing it.
Feel free to work on it yourself, and post it here (or elsewhere) for any other users that might find it useful. You can trigger a screen-switch in WindowPad using: | Code: | WindowScreenMove("Next")
WindowScreenMove("Prev, P")
; etc. | (The function follows the same parameter conventions as the pseudo-command in WindowPad.ini, but note that the commas should be inside the string.) |
|
| Back to top |
|
 |
Ktafil Guest
|
Posted: Wed Nov 07, 2007 7:26 pm Post subject: ini file |
|
|
Randhirv,
Maybe you want something like this:
| Code: |
[Hotkeys]
Tab = Hotkeys, Active Window (WADS)
CapsLock = Hotkeys, Previous Window (WADS)
Numpad0 = Hotkeys, Active Window (Numpad)
NumpadDot = Hotkeys, Previous Window (Numpad)
[Hotkeys: Active Window (WADS)]
z = WindowPadMove, -1, +1, 0.5, 0.5
x = WindowPadMove, 0, +1, 1.0, 0.5
c = WindowPadMove, +1, +1, 0.5, 0.5
a = WindowPadMove, -1, 0, 0.5, 1.0
s = WindowPadMove, 0, 0, 1.0, 1.0
d = WindowPadMove, +1, 0, 0.5, 1.0
q = WindowPadMove, -1, -1, 0.5, 0.5
w = WindowPadMove, 0, -1, 1.0, 0.5
e = WindowPadMove, +1, -1, 0.5, 0.5
Esc = MaximizeToggle
LAlt = WindowScreenMove, Next
LCtrl = WindowScreenMove, Prev
1 = GatherWindows, 1
2 = GatherWindows, 2
[Hotkeys: Previous Window (WADS)]
z = WindowPadMove, -1, +1, 0.5, 0.5, P
x = WindowPadMove, 0, +1, 1.0, 0.5, P
c = WindowPadMove, +1, +1, 0.5, 0.5, P
a = WindowPadMove, -1, 0, 0.5, 1.0, P
s = WindowPadMove, 0, 0, 1.0, 1.0, P
d = WindowPadMove, +1, 0, 0.5, 1.0, P
q = WindowPadMove, -1, -1, 0.5, 0.5, P
w = WindowPadMove, 0, -1, 1.0, 0.5, P
e = WindowPadMove, +1, -1, 0.5, 0.5, P
Esc = MaximizeToggle, P
LAlt = WindowScreenMove, Next, P
LCtrl = WindowScreenMove, Prev, P
1 = GatherWindows, 1
2 = GatherWindows, 2
[Hotkeys: Active Window (Numpad)]
Numpad1 = WindowPadMove, -1, +1, 0.5, 0.5
Numpad2 = WindowPadMove, 0, +1, 1.0, 0.5
Numpad3 = WindowPadMove, +1, +1, 0.5, 0.5
Numpad4 = WindowPadMove, -1, 0, 0.5, 1.0
Numpad5 = WindowPadMove, 0, 0, 1.0, 1.0
Numpad6 = WindowPadMove, +1, 0, 0.5, 1.0
Numpad7 = WindowPadMove, -1, -1, 0.5, 0.5
Numpad8 = WindowPadMove, 0, -1, 1.0, 0.5
Numpad9 = WindowPadMove, +1, -1, 0.5, 0.5
NumpadAdd = MaximizeToggle
NumpadEnter = WindowScreenMove, Next
NumpadDiv = GatherWindows, 1
NumpadMult = GatherWindows, 2
[Hotkeys: Previous Window (Numpad)]
Numpad1 = WindowPadMove, -1, +1, 0.5, 0.5, P
Numpad2 = WindowPadMove, 0, +1, 1.0, 0.5, P
Numpad3 = WindowPadMove, +1, +1, 0.5, 0.5, P
Numpad4 = WindowPadMove, -1, 0, 0.5, 1.0, P
Numpad5 = WindowPadMove, 0, 0, 1.0, 1.0, P
Numpad6 = WindowPadMove, +1, 0, 0.5, 1.0, P
Numpad7 = WindowPadMove, -1, -1, 0.5, 0.5, P
Numpad8 = WindowPadMove, 0, -1, 1.0, 0.5, P
Numpad9 = WindowPadMove, +1, -1, 0.5, 0.5, P
NumpadAdd = MaximizeToggle, P
NumpadEnter = WindowScreenMove, Next, P
NumpadDiv = GatherWindows, 1
NumpadMult = GatherWindows, 2
[Gather: Exclude Windows]
Window=ahk_class SideBar_AppBarWindow
Window=ahk_class SideBar_HTMLHostWindow
Window=ahk_class BasicWindow
[Gather: Exclude Processes]
; Process=sidebar.exe
|
this is the key layout .INI file i made for my laptop (not 100% sure to keep this config yet)
I can still use the numpad keys when docked in a dockingstation and
I can use Tab-Alt to move to next window for example or Tab-c for lower right corner.
Compare this one with the one Lexikos has, and play with it to make key configs as it is to your convinience!
I made my windowpad an .exe file, but you can not just convert it.
You would have to ";" out line 66 to get the .exe to work fine.
Lexikos, One thing missing for me, there is a maximise option, but i still miss the minimise option. Maybe i will try to build it in myself, but not sure if i succeed in that. |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2492 Location: Australia, Qld
|
Posted: Wed Nov 07, 2007 10:15 pm Post subject: Re: ini file |
|
|
| Ktafil wrote: | I made my windowpad an .exe file, but you can not just convert it.
You would have to ";" out line 66 to get the .exe to work fine. | Oops, that line is meant for the final script. The AutoHotkeySC.bin file I use has a bunch of WindowPad icons embedded in it.
| Quote: | | Lexikos, One thing missing for me, there is a maximise option, but i still miss the minimise option. | It's on my TODO list. |
|
| Back to top |
|
 |
lundstrj
Joined: 20 Nov 2007 Posts: 1 Location: Sweden
|
Posted: Tue Nov 20, 2007 10:52 am Post subject: Sweet |
|
|
Hi,
I just stumbled on this place a few minutes ago looking for a key to splitview (the quite expensive program which claims my trial period is over). Anyways, this WindowPad script of yours does everything splitview does, but with much neater hotkeys=) not to mention it comes at a much nicer price.
Really, from the bottom of my otherwise so dark soul, thank you!
I'll be sure to sweep this community for other goodies as soon as I get a chance to. |
|
| Back to top |
|
 |
Andreone
Joined: 20 Jul 2007 Posts: 257 Location: Paris, France
|
Posted: Wed Nov 21, 2007 2:16 pm Post subject: |
|
|
Another request: show desktop only for a particular monitor.
Win+D already exists to show the desktop, but it minimizes all windows on all monitors. What I would like is a combo to minimize only the windows from monitor 1 or monitor 2.
Well, let me know if it sounds interesting to you.
Thank you |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2492 Location: Australia, Qld
|
Posted: Wed Nov 21, 2007 10:26 pm Post subject: |
|
|
Andreone, sounds interesting.
lundstrj, you're welcome.
 |
|
| Back to top |
|
 |
agar Guest
|
Posted: Tue Nov 27, 2007 6:47 am Post subject: Your script is awesome! |
|
|
I use this constantly at work. Like lundstrj, I used SplitView...had a few problems with it, so I wouldn't have registered it anyway, but your script is more full featured and works the way I want.
Your responsiveness is great too, and I really appreciate the frequent updates. I had the problem with the numpad being unavailable when I'm undocked, looked at the forum, and saw you had a beta that added use of CapsLock just for that purpose. Wow!
OK, now that I've sucked up , I wonder if I could ask about one tiny thing...
When I leave work I take my laptop with me. Typically I'll first suspend, then undock, then go home and open up my laptop and work with no external monitor. Unfortunately, windows that were open on the external screen are now invisible as they're still placed on the external screen that no longer exists.
I was hoping I could use the "gather windows" function (CapsLock-1) to move all the windows to screen 1, but it doesn't work. I'm not sure if it's a WindowPad issue or an AHK problem, but gather windows only seems to be enabled if Windows actually sees two screens. In this case, the reason I want to gather the windows is because screen 2 no longer exists.
Note that I can move each window by hand with CapsLock-D to move them to the right a few times, but is there a way to enable gather windows even if Windows only "sees" a single screen?
Thanks! |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2492 Location: Australia, Qld
|
Posted: Tue Nov 27, 2007 8:55 am Post subject: |
|
|
WindowPad uses the center of a window to determine which monitor it is on. If the center of the window is off-screen, GatherWindows would erroneously assume that the window is on monitor 1.
Since windows are moved between monitors based on their position relative to the top-left of the source and destination monitors, any window considered to be on the destination monitor will not be moved.
I've updated the beta with two changes:
- If the center of a window is not visible, GatherWindows will move the window to the center of the screen.
- GatherWindows no longer restores maximized windows that are already where they need to be.

|
|
| Back to top |
|
 |
agar Guest
|
Posted: Wed Nov 28, 2007 5:55 am Post subject: |
|
|
You are THE MAN! (or the WOMAN, since "lexikos" is a bit ambiguous...hmm, you know what I mean I hope! You rock! )
This works great. I do notice that the windows don't auto-resize in this case, though they do when gathering between two actual screens. Very minor, given the annoyance this already spares me, but I thought I'd mention it.
From other messages, it looks like you're open to ideas for future versions. I'm not even sure this is possible with AHK, but here's my one remaining peeve with Windows' handling of multi-monitors: the PnP auto-detection is very sketchy, and I'm constantly going into Display Properties to re-enable my external monitor and position it properly after I undock and re-dock (or connect to a completely different config, like a projector).
A great feature would be "named configurations" where I could specify that this is my "docked" setup. If I select that later, my config would revert to those saved settings: external monitor would be enabled, resolution set, desktop screen extended, and monitor position moved back to my preferred spot. A "home" setup might position a monitor differently with a different resolution, and so forth.
This may be beyond the scope of WindowPad, but I thought I'd throw it out there. Am I the only one to suffer from this problem?
Anyway, regardless, thanks again for your work on WindowPad. |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2492 Location: Australia, Qld
|
Posted: Wed Nov 28, 2007 6:53 am Post subject: |
|
|
| agar wrote: | | I do notice that the windows don't auto-resize in this case, | How would you expect them to auto-resize? Auto-resizing is (obviously) based on the relative sizes of the monitors. If there's only one monitor, it isn't applicable.
| Quote: | | A great feature would be "named configurations" where I could specify that this is my "docked" setup. If I select that later, my config would revert to those saved settings: external monitor would be enabled, resolution set, desktop screen extended, and monitor position moved back to my preferred spot. A "home" setup might position a monitor differently with a different resolution, and so forth. | It can be done by DllCall'ing the Win32 function ChangeDisplaySettingsEx, or writing to the registry and calling ChangeDisplaySettings. Search the forums for "ChangeDisplaySettings", or have a look at this script (which uses the registry methods.)
| Quote: | | This may be beyond the scope of WindowPad, | Yep.
I have dual LCDs, so I like to avoid ever changing resolutions. However, I do have a hotkey to toggle my "primary" display (thus causing it to switch inputs.) See this thread. |
|
| Back to top |
|
 |
agar Guest
|
Posted: Wed Nov 28, 2007 8:04 am Post subject: |
|
|
| Quote: | | How would you expect them to auto-resize? Auto-resizing is (obviously) based on the relative sizes of the monitors. If there's only one monitor, it isn't applicable. |
Good point, the original size of the (now disconnected) external monitor is no longer available so the relative size can't be calculated. I guess my preference would be to have windows resized downwards so they fit within the size of the target display, but I don't know if everyone would want that. It also would likely require special case code that may not be worth it for general purposes.
Thanks for the references to the other threads. A lot of good info in there. Someday if I find the time I might try to hack together what I described. |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Nov 30, 2007 7:34 pm Post subject: |
|
|
@lexikos this is awesome. The 'move to next' was exactly what i was looking for. thanks for sharing!
this would probably be a hole other script but is it possible to send maximize from youtube videos to Next display? The button is integrated in flash so i gueess its not that easy? |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|