 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
JGarf Guest
|
Posted: Tue May 25, 2004 10:26 pm Post subject: Window "roll-up" to menu title |
|
|
Hi! There are small utility programs (one of them is called "cool mouse")that "roll up the active window to its title bar", meaning that if you click for example with your Mouse Wheel button on the title bar of Word the whole text window disappears and only the menu title remains on the desktop giving easy access to other apps.
Is there any way, perhaps controlsend something, to implement this in AHK? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Tue May 25, 2004 11:44 pm Post subject: |
|
|
I'm not sure exactly how those rollup (shading) programs work, since I couldn't locate any source code on the net. However, the following might be a primitive solution:
| Code: | #space::
WinGetPos, , , , active_height, A
if active_height > 30 ; Value needs to be a little larger to allow it to work.
WinMove, A, , , , , 25
else
{
;WinGetPos, , , , desk_height, Program Manager
;WinMove, A, , , , , %desk_height%
WinRestore, A
WinMaximize, A
}
return |
If desired, the above can be embellished by having a mouse double-click detected in the title bar, in which case the window will be rolled up or unrolled. You could also have it store the original size of the window in variables so that the window can be restored to exactly how it was before (rather than maximized). |
|
| Back to top |
|
 |
Jon
Joined: 28 Apr 2004 Posts: 373
|
Posted: Tue May 25, 2004 11:46 pm Post subject: |
|
|
I'm sure someone else will come up with a better way but this seems to work-
| Code: |
~Mbutton::
Delay = 20 ;set time to hold middle button before window moves here
HowLong = 0
Loop
{
HowLong ++
Sleep, 10
GetKeyState, MButton, MButton, P
IfEqual, MButton, U, Break
}
IfLess, HowLong, %Delay%, Return
WinGetTitle, OutputVar, A ;Gets the windows title
winactivate ; activates the window
WinRestore, %OutputVar%
;Change the width and Height of title bar here
WinMove, %OutputVar%, , 0, 0, 500, 35 ;
|
Last edited by Jon on Wed May 26, 2004 5:22 pm; edited 2 times in total |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Wed May 26, 2004 12:05 am Post subject: |
|
|
other guys beat me to this reply ...i'd also written a script but now its not needed.  _________________
 |
|
| Back to top |
|
 |
JGarf Guest
|
Posted: Wed May 26, 2004 11:09 pm Post subject: Thanks |
|
|
I modified the script so it undoes the roll up afterwards and keeps the original position.
| Code: | ~Mbutton::
Delay = 20 ;set time to hold middle button before window moves here
HowLong = 0
Loop
{
HowLong ++
Sleep, 10
GetKeyState, MButton, MButton, P
IfEqual, MButton, U, Break
}
IfLess, HowLong, %Delay%, Return
WinGetTitle, OutputVar, A ;Gets the windows title
winactivate ; activates the window
WinRestore, %OutputVar%
WinGetPos, X, Y,Width, Height , A ; "A" to get the active window's pos.
If Height = 35
{
WinMove, %OutputVar%, ,%X%, %Y%,%Width%, %StoredHeight%
}
else
{
WinMove, %OutputVar%, ,%X%, %Y%,%Width%, 35 ;
StoredHeight=%Height%
}
return
|
Now it works somehow as the window is being rolled up. Problem is that if you do it to more windows you will not be able to recover all window positions. And besides, you can still see the frame of the window... Since now many progs have this feature, exists a window function that does it? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Thu May 27, 2004 1:41 am Post subject: |
|
|
| Quote: | | Since now many progs have this feature, exists a window function that does it? |
I suspect there is, but it's not well publicized despite how many programs can do it. If anyone knows, I'll raise the priority of this item if it's not too hard to implement. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Fri May 28, 2004 1:10 pm Post subject: |
|
|
Here's a good one. I'll try to apply its rollup technique and "minimize to tray" feature to a future version of AHK:
http://www.palma.com.au/winroll/
Make a window roll into its title bar, send it to the back or make it stay on top. Minimize, maximize or close all visible windows, including minimizing to the tray area. Make a window translucent on Windows 2000 or above. WinRoll is lovingly hand-crafted in 100% pure assembly language to give the fastest response and the smallest memory footprint. WinRoll is proudly a FREEWARE and OPEN SOURCE application. |
|
| Back to top |
|
 |
JGarf Guest
|
Posted: Sat May 29, 2004 11:15 pm Post subject: |
|
|
| Cool! Looking forward to it! |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Aug 07, 2004 10:58 pm Post subject: MrB |
|
|
| Any News on the implementation plan? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
|
| Back to top |
|
 |
whynot
Joined: 06 Aug 2004 Posts: 10
|
Posted: Sun Aug 08, 2004 3:08 am Post subject: Blue Carpets WinShade |
|
|
This is a program that's made to provide various mouse button/window interactions. For instance, you can set it up so that when you middle click a title bar, the window maximizes vertically, and when you right click a title, the window folds up, as per up as per the discussion here. There's a number of other possibilities also.
It used to be shareware, but was turned into freeware/abandonware awhile ago by Blue Carpet, its creators. It's very lightweight, and works great in XP, in addition to earlier versions of Windows.
The only drawback to using it with XP, or other themeing type of skins, is that the folded up Window reverts back to a Windows Classic look & feel until it's unfolded. Functionally, it's 100% cool.
You can find a download for it, as well as the neccesary reg info (again, provided by the company as a universal freeware reg when it was donated as freeware) at the following site: http://www.saunalahti.fi/eike/
I know it's not using AHK, but I've used it for years & thought others might appreciate as well since it meets the needs of this thread.  |
|
| 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
|