topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 9:34 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: WinDim 1.1.4.0  (Read 8940 times)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
WinDim 1.1.4.0
« on: July 23, 2012, 05:25 PM »
WinDim 1.0.0.4 is a hotkey to get the dimensions of the active window and optionally save them to clipboard. It can also set the dimensions of an active window from the clipboard save, if the target has sizeable border style.

You may download from my Hotkeys Page

It creates no .ini files or Registry settings. Just copy the exe to a folder in your path. Click on Tray Icon for usage dialog.
« Last Edit: July 25, 2012, 02:34 PM by MilesAhead »

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: WinDim 1.0.0.4
« Reply #1 on: July 24, 2012, 09:53 AM »
Thanks for continually posting these kinds of utils, MA  :Thmbsup:

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: WinDim 1.0.0.4
« Reply #2 on: July 24, 2012, 03:24 PM »
Thanks for continually posting these kinds of utils, MA  :Thmbsup:
-cranioscopical (July 24, 2012, 09:53 AM)

Thanks for the kind comment. I think I'm going to update it so you can choose to size,place or both, the window.

Nice to know there's really somebody out there. :)

joiwind

  • Participant
  • Joined in 2009
  • *
  • Posts: 486
  • carpe momentum
    • View Profile
    • Donate to Member
Re: WinDim 1.0.0.4
« Reply #3 on: July 24, 2012, 05:10 PM »

Nice to know there's really somebody out there. :)


Or did you mean "Nice to know there's somebody real out there  :)"

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: WinDim 1.0.0.4
« Reply #4 on: July 24, 2012, 06:02 PM »

Nice to know there's really somebody out there. :)


Or did you mean "Nice to know there's somebody real out there  :)"

Both :)  Add in they like my software and I don't mind  it being free.
(Of course it would feel even "freer" if I had a trust fund, but can't have everything.) :)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: WinDim 1.1.0.0
« Reply #5 on: July 24, 2012, 06:06 PM »
WinDim 1.1.0.0 Some significant changes. Took clipboard out of the mix.  Added a Gui with edit lines to fine tune size/position values.  Also the target window may be sized,positioned or both.

There is a normalize function for window width height that's basically a sanity check to set minimums. But the source is included.

If you compile yourself please use the latest AHK_L release. I'm using 32 bit English language Unicode version 1.1.08.00

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: WinDim 1.1.1.0
« Reply #6 on: July 25, 2012, 03:36 AM »
WinDim 1.1.1.0  Changed Erase Button to Copy to clibboard. Added title to Gui. Aligned Gui controls. Updated Readme.txt file.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: WinDim 1.1.2.0
« Reply #7 on: July 25, 2012, 12:42 PM »
WinDim 1.1.2.0 Removed the "training wheels."  No normalize function is performed on width or height of the window.  Also it's no longer required to do a "save" before using the "set" hotkey.  Winkey +s will bring up the Gui. This enables the precise positioning and/or sizing of the active window by entering numbers in the edit lines. Of course you can still use Winkey +g to get dimensions from the active window.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: WinDim 1.1.3.0
« Reply #8 on: July 25, 2012, 01:12 PM »
WinDim 1.1.3.0 WinDim can now be used to Position a window with non-sizeable borders. Attempts to use Size or Both Buttons will display an error dialog if the target window is not sizeable.  Minor bug fixes.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: WinDim 1.1.4.0
« Reply #9 on: July 25, 2012, 02:35 PM »
WinDim 1.1.4.0 Now if the target window is not resizeable a status bar msg is displayed and the Size and Both Buttons are disabled. In that case the default button is set to Position.

Here's a scree shot of the Set dialog

WinDim.jpg
« Last Edit: July 25, 2012, 03:26 PM by MilesAhead »

Giampy

  • Participant
  • Joined in 2009
  • *
  • Posts: 444
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: WinDim 1.1.4.0
« Reply #10 on: July 25, 2012, 03:15 PM »
I wonder when WinDim may be useful.
"A refrigerator without beer is like a body without soul"

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: WinDim 1.1.4.0
« Reply #11 on: July 25, 2012, 03:25 PM »
I wonder when WinDim may be useful.

I can't tell you what's useful for you. Other than the occasional request for a small script, all my programs are written for my own use. I just share 'em. If you have no desire to precisely position or size a window, then it's likely of no use to you at all.

daddydave

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 867
  • test
    • View Profile
    • Donate to Member
Re: WinDim 1.1.4.0
« Reply #12 on: July 25, 2012, 06:20 PM »
I wonder when WinDim may be useful.

I find there are a lot of programs here at DC (especially in Coding Snacks where a lot of them are written for one person) that I may not see an immediate use for, and then years later I need it for some reason!

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: WinDim 1.1.4.0
« Reply #13 on: July 25, 2012, 06:30 PM »
I wonder when WinDim may be useful.

Here's one: If you're a (web) developer that needs to check out how an interface looks at varying resolutions, this tool would make it easy to resize windows to the standard sizes, e.g., 800x600, 1024x768, 1280x1024, etc..  Just a thought.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: WinDim 1.1.4.0
« Reply #14 on: July 25, 2012, 08:17 PM »
Try using something like an onscreen caliper or ruler just to get the window's width and height. Then you'll see it's simpler and more exact for simple window width and height, to do it via a Windows function. One function call returns the window's size and position to the pixel.

For one example, every time I open Malwarebyes anti-malware it opens at a different spot. If I want to make a script to launch it with position and size, it's trivial if I have the exact numbers. In fact I think I'll do it now because it's annoying launching, then hotkeying it into place every time I run it.

It's probably more useful for programmers than for the average user.  If I have a window that's the perfect size for a particular task, there's no pre-fabricated way to get the exact numbers. Often what people do is lay another window on top and mess around with the mouse trying to get the 2 windows to match perfectly. That's a real time waster.




« Last Edit: July 25, 2012, 08:22 PM by MilesAhead »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: WinDim 1.1.4.0
« Reply #15 on: July 25, 2012, 08:32 PM »
The example case is already done.  This ahk_l script runs MBAM and puts it right where I want it.

#NoTrayIcon
handle := 0
Run,C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe
WinWaitActive,Malwarebytes Anti-Malware,,8
if (! ErrorLevel)
{
  handle := WinExist("Malwarebytes Anti-Malware")
  if (handle)
   WinMove,ahk_id %handle%,,67,365
 }

With WinDim there was no farting around required to get the exact position.

edit: another way of doing the same thing is a utility like WinSize2. Different ways to skin the cat.

edit2: added ErrorLevel check in case MBAM doesn't come up by the time-out. Avoids moving just any active window.

edit3: updated the code so you don't have to run the script and wait for MBAM to come up. It gets the handle as soon as MBAM window is active, rather than depending on it remaining the active window.  Should work ok even if different windows are getting the focus. For example, you run this script then use FolderCache to open the last 4 folders. :)

« Last Edit: August 05, 2012, 12:37 AM by MilesAhead »