ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Coding Snacks

Maximize Windows "partially" [finished]

<< < (5/5)

kli6891:
OK, I finished my program. It works in conjunction with Desktop Coral (by mouser), so that when the user presses a hotkey (configurable), it moves the active window to the dock of Desktop Coral.

You need the latest version of Desktop Coral (1.07.01 - September 6, 2009) for this to work. You can download it here.


Once you downloaded and docked Desktop Coral, you can use my script, and press ctrl+shift+e to make the current window move (and resized) to the docked place.

In the .ini file, you can change the hotkey, as well as the path of your DesktopCoral.ini file.

Thanks to mouser and everyone who helped in this thread.
Bug reports and suggestions are welcome!


Download the script here.
http://www.autohotkey.net/~kli6891/onTop/onTop.ahk

ehatherley:
script does not work with Desktop Coral v1.10.01 due to a change in the .INI file or possibly a change in the way AHK counts lines. In any case, the script can be 'fixed' by changing the following lines:

   FileReadLine, DpLeft, %DC_Ini_Path%, 25
   FileReadLine, DpTop, %DC_Ini_Path%, 26
   FileReadLine, DpRight, %DC_Ini_Path%, 27
   FileReadLine, DpBottom, %DC_Ini_Path%, 28

change to read:

   FileReadLine, DpLeft, %DC_Ini_Path%, 26
   FileReadLine, DpTop, %DC_Ini_Path%, 27
   FileReadLine, DpRight, %DC_Ini_Path%, 28
   FileReadLine, DpBottom, %DC_Ini_Path%, 29

Ideally, the script should be expanded to scan the .INI file to find the proper section and read the assignments rather than blindly copying values, but this will do for a quick&dirty workaround.

skwire:
Ideally, the script should be expanded to scan the .INI file to find the proper section and read the assignments rather than blindly copying values, but this will do for a quick&dirty workaround.-ehatherley (November 02, 2011, 10:37 AM)
--- End quote ---

Change the following lines from:


--- Code: Autohotkey ---FileReadLine, DpLeft, %DC_Ini_Path%, 25FileReadLine, DpTop, %DC_Ini_Path%, 26FileReadLine, DpRight, %DC_Ini_Path%, 27FileReadLine, DpBottom, %DC_Ini_Path%, 28
To:


--- Code: Autohotkey ---IniRead, DpLeft, %DC_Ini_Path%, DockedPanel, DpLeftIniRead, DpTop, %DC_Ini_Path%, DockedPanel, DpTopIniRead, DpRight, %DC_Ini_Path%, DockedPanel, DpRightIniRead, DpBottom, %DC_Ini_Path%, DockedPanel, DpBottom
You will probably need to remove the following lines as well:


--- Code: Autohotkey ---topX := getValue(DpLeft)topY := getValue(DpTop) DpRight := getValue(DpRight)DpBottom := getValue(DpBottom)

Untested, but it should work.

mouser:
Thanks for sharing ehatherley, and for the follow up, skwire.  :up:

MilesAhead:
Is it possible to make a program using AHK such that when I maximizes a window, it doesn't fill the entire screen, rather it fills it partially.

The gadgets sidebar in Windows Vista is like this; when you maximize, the window maximizes up to the sidebar, and doesn't cover it. Something like that, but a user defined region, is what I'm looking for.


Thanks.
-kli6891 (August 19, 2009, 05:38 PM)
--- End quote ---

Since this topic was created I have found a simple approach that works in some circumstances.  It simply sets the Work Area of the desktop using the Windows Set Work Area function.

Note that if Taskbar AutoHide is enabled, the system ignores the work area setting.

You can download Adjust Work Area from this page:

http://www.favessoft.com/downloads.html

As you can see in this screen shot, I use RocketDock. That got me interested in ways to maximize a window without obscuring it.



I have a .cmd file in my StartUp Folder that uses awa.exe to set the work area to leave RocketDock in the clear.  This screen shot shows an editor maximized in the normal way. Notice that RocketDock is not covered.

Navigation

[0] Message Index

[*] Previous page

Go to full version