DonationCoder.com Forum

DonationCoder.com Software => Coding Snacks => Post New Requests Here => Topic started by: thefritz_j on July 19, 2007, 06:06 PM

Title: IDEA: Auto-Tile open windows.
Post by: thefritz_j on July 19, 2007, 06:06 PM
How about an app that would run in the systray and each time a window would open it would Auto-Tile, (auto fit) the new window with all of the currently open windows.  So with each new opened window all of the other windows are still visible, but smaller of course, and re-tiled so that they all fit the screen.

Probably the snarkiest part would be to decide which method to tile, ... here's a suggested tile-method order:

1 window =>  1x1 ( ;) maximized)
2 windows => 2x1 (two tiled windows across)
3 windows => 2x2 (one blank tile)
4 windows => 2x2
5 windows => 3x2 (one blank tile)
6 windows => 3x2
7 windows => 4x2 (widescreen monitors!, one blank tile)
8 windows => 4x2
9 windows =>  what??? you really have 9 windows open at once!!!  :huh:

I'd imagine the blank tile would just show the desktop below.

Good idea? Easy?
Title: Re: IDEA: Auto-Tile open windows.
Post by: nite_monkey on July 19, 2007, 10:36 PM
just asking, have you ever right clicked on the taskbar? if someone has, maybe you could get an idea of how to tile the windows that way.
Title: Re: IDEA: Auto-Tile open windows.
Post by: justice on July 20, 2007, 01:48 AM
BTW on a sidenote are there hotkeys for cascade windows, tile horizontally/vertically?
I guess it would be used more that way. I suggest the requester is looking for GridMove (http://jgpaiva.dcmembers.com/gridmove.html) or is an featurerequest for GridMove?
Title: Re: IDEA: Auto-Tile open windows.
Post by: thefritz_j on July 20, 2007, 10:06 AM
Yeah, maybe this is a feature request for GridMove,... like "Auto-Fill grid positions with newly opened windows"?,
but what about increasing the number of positions to handle the number of open windows?  Is that still within the scope of Gridmove?
Title: Re: IDEA: Auto-Tile open windows.
Post by: jgpaiva on July 20, 2007, 03:24 PM
This has been talked as being a part of gridmove, but i thought it wouldn't be that good idea.
BUT, i'm going to do this coding snack, as long as you don't ask me to make it "smart", by generating grids when you go over 8 windows ;)
Title: Re: IDEA: Auto-Tile open windows.
Post by: brett on July 20, 2007, 04:42 PM
BTW on a sidenote are there hotkeys for cascade windows, tile horizontally/vertically?

None in Windowz xp, not sure about vista.
I had a talk with jgpaiva a little while ago about tiling, and as he is far more educated in scripting then myself, we will see what he comes up with. :)

Brett
Title: Re: IDEA: Auto-Tile open windows.
Post by: jgpaiva on July 20, 2007, 05:08 PM
Actually, maybe you could post your script here, brett.

BTW.. why doesn't the rightclick taskbar-> title windows method not fit you, thefritz_j?
Title: Re: IDEA: Auto-Tile open windows.
Post by: thefritz_j on July 20, 2007, 05:26 PM
Two things wrong with the Task bar Context menu tiling.

There's only vertical and horizontal options, and you'd have to manually do it (two clicks) after each time you open a new window.  That's the "auto" part :)
Title: Re: IDEA: Auto-Tile open windows.
Post by: justice on July 21, 2007, 07:27 AM
I can see you asking for 'ignore certain applications' options and 'remove apps toolbars' options right after v1 lol basically the lack of screen space and the fact you won't want all applications minimized might be a problem? Don't know how' you'll use it like but it seems logical.
Title: Re: IDEA: Auto-Tile open windows.
Post by: jgpaiva on July 26, 2007, 10:01 AM
Ok... Let's see what you think about this.
Just unpack the attached zip, and run "AutoTile.exe". (or AutoTile.ahk, if you have autohotkeys installed).

added window height check and fixed misspelling
Title: Re: IDEA: Auto-Tile open windows.
Post by: thefritz_j on July 26, 2007, 02:42 PM
Wow! it's BEEWTEEFULLLL!  :-*

Lemme try it for a day or so and I'll give you some feedback on it, sound like a plan?

Thanks again, I'm excited to try this!
8)
Title: Re: IDEA: Auto-Tile open windows.
Post by: nite_monkey on July 26, 2007, 03:22 PM
I don't know if it's just me, but when ever I try to run your autotile program I get bombarded with the error Can't find script engine "JScript" for script "file location".
Title: Re: IDEA: Auto-Tile open windows.
Post by: thefritz_j on July 26, 2007, 03:27 PM
I extracted all three files into their own folder and it worked. 

What does the js file do anyway?
Title: Re: IDEA: Auto-Tile open windows.
Post by: jgpaiva on July 26, 2007, 03:30 PM
Oh damn... Do you get that error when you try to run the windowtitle.js included in the zip, nite_monkey?

That's a javascript file, but i supposed it was somehow installed on all windows instalations.

Does anyone know how this can be solved?
Title: Re: IDEA: Auto-Tile open windows.
Post by: justice on July 26, 2007, 03:31 PM
on my work pc the js file is opened by my html editor because that's the standard app to open js files. everytiem i start an app lol :) but i can see why.
Title: Re: IDEA: Auto-Tile open windows.
Post by: jgpaiva on July 26, 2007, 03:31 PM
What does the js file do anyway?
The js file is what actually tiles the windows. As ahk doesn't have any code for this, and it'd be quite a pain to code, i used some "help" ;)

Glad to know it's working for you, fritz :)
Title: Re: IDEA: Auto-Tile open windows.
Post by: justice on July 26, 2007, 03:31 PM
download windows scripting host 5.6 from
http://www.microsoft.com/downloads/details.aspx?familyid=C717D943-7E4B-4622-86EB-95A22B832CAA
This download installs Microsoft® Windows® Script containing Visual Basic® Script Edition (VBScript.) Version 5.6, JScript® Version 5.6, Windows Script Components, Windows Script Host 5.6, and Windows Script Runtime Version 5.6.
Title: Re: IDEA: Auto-Tile open windows.
Post by: nite_monkey on July 26, 2007, 04:30 PM
Thanks justice, I downloaded that, and now I don't get the error.
Title: Re: IDEA: Auto-Tile open windows.
Post by: thefritz_j on July 27, 2007, 10:08 AM
Joy! I'm lovin' it!  :Thmbsup:

(As a side note prior to trying this I was using the lifehack SweptAway program and just for kicks I didn't turn it off when testing this and.... I like the results.  Things stay tiled but when you stop using one  of the tiled windows it Auto-Un-Tiles it! WOW!  So if I stay in one program for a long time, eventually it is maximized! So nice.)

My only comments are 1) that sometimes the windows switch positions, but now I see that you are using the built in Windows tiling there's not much you can do about that.  8)

and 2) would there be a way to not tile when a tiny pop-up window comes up?  Maybe you could tell me how to tweak the ahk to not do it when the window height is below... 200px?

I really like how the save, open, windows dialogs are tiled too!  In the past I was always changing their size and now they are perfect.

Thanks again for this! Any ideas about #2?


Title: Re: IDEA: Auto-Tile open windows.
Post by: jgpaiva on July 27, 2007, 10:14 AM
I see the combination with sweptaway, fritz.. Interesting! :D

About #2: It can be hard to identify those windows. Let's just specify better what you mean by "tiny pop-up" window. I can specify something like: if window is smaller than a specific height, do not tile.

BUT, if that window stays on the screen and a window is minimized / opened / etc, that window will be tiled too, because of #1. I have no control on which windows are tiled, all of the active windows are.

What do you think about this idea?
Title: Re: IDEA: Auto-Tile open windows.
Post by: thefritz_j on July 27, 2007, 10:24 AM
jgpaiva,

Right, but perhaps you could not "invoke" the javascript from the ahk if... the height was less than 200px.  Maybe?

I see what you're saying about it being tiled the next time, that would be okay because usually I've already clicked on the "yes/no" or "ok/cancel" from the pop-up by then anyway. ya know?

Thanks again for exploring this with me! :)

(Also, I'm just getting a feeling for things, has this gone beyond the "snack" stage?)
Title: Re: IDEA: Auto-Tile open windows.
Post by: jgpaiva on July 27, 2007, 12:13 PM
Right, but perhaps you could not "invoke" the javascript from the ahk if... the height was less than 200px.  Maybe?
Ok, that's simple, I should have it in a few hours. (not that it takes much time, but i've got to go buy myself some clothes now ;) )


(Also, I'm just getting a feeling for things, has this gone beyond the "snack" stage?)
;D ;D ;D You surely haven't seen GridMove's thread (https://www.donationcoder.com/forum/index.php?topic=3824.0). THAT'S gone beyond the snack stage ;)
Title: Re: IDEA: Auto-Tile open windows.
Post by: jgpaiva on July 27, 2007, 01:47 PM
Ok... Done.
See the post above for download link.

The default height is 200 pixels, but it can be custumized. Just edit the ini file and change the "dialogheight" parameter.
Title: Re: IDEA: Auto-Tile open windows.
Post by: thefritz_j on August 29, 2007, 09:38 AM
Wow, ya know I'm STILL using this and Love it!  :D

Should someone (I dunno, maybe me?) move this to the "Finished" forum?
Title: Re: IDEA: Auto-Tile open windows.
Post by: justice on August 29, 2007, 10:02 AM
When i'm using visual web developer studio express, everytime i pess the right mouse button all the windows are reordered so I can't run it fullscreen :(
Title: Re: IDEA: Auto-Tile open windows.
Post by: sri on August 29, 2007, 10:07 AM
thefritz: Can you give us the link to other program you are using in conjunction with this?
Title: Re: IDEA: Auto-Tile open windows.
Post by: justice on August 29, 2007, 10:51 AM
I've altered the script so it tiles when i press and release the ALT-key, instead of autotiling for personal use. If there's any interest send me a PM.
Title: Re: IDEA: Auto-Tile open windows.
Post by: thefritz_j on August 29, 2007, 11:58 AM
sri, http://lifehacker.com/software//lifehacker-code-swept-away-windows-255055.php

justice, I'd like to try out the revised script.  you're saying it only rearranges when you press the alt key... is this "global" to all windows?
Title: Re: IDEA: Auto-Tile open windows.
Post by: JennyB on August 30, 2007, 02:47 PM
How about an app that would run in the systray and each time a window would open it would Auto-Tile, (auto fit) the new window with all of the currently open windows.  So with each new opened window all of the other windows are still visible, but smaller of course, and re-tiled so that they all fit the screen.

Probably the snarkiest part would be to decide which method to tile, ...

A idea inspied by the Oberon window manager:

Maintain two columns of windows, spanning the entire width of the screen.
Windows take the width of the column they are in (fixed width windows are centred).
The width of a single column can be manually adjusted from 0-100%, and all displayed windows adjust to suit.

New windows, by default, open at the  top of the teft column, taking any extra vertical space equally from any other open windows in the column.

Maximised windows take up the whole column height; minimised windows are reduced to a title bar.
 
Moving a window moves it to the other column and/or inserts it at a new positionwithin the column using the rules above.

Feasible?
Title: Re: IDEA: Auto-Tile open windows.
Post by: justice on August 31, 2007, 05:38 AM
try moving the taskbar to the left hand side, make it wider, then make the background transparent (would need tool). then use auto-tile :) comes close i think.
Title: Re: IDEA: Auto-Tile open windows.
Post by: thefritz_j on August 31, 2007, 09:36 AM
Is something like what JennyB, is describing possible with GridMove?  :huh:


I like the auto tile that jgpaiva came up with because it doesn't use anything extra to make it work, just the internal Microsoft Windows tiling mechanism.  'course you have to live with the rules that they've set up, i.e. when you Tile Vertical, it starts tiling horizontal when there are more than three windows.  If you don't like that aspect, then, yeah maybe something else would fit the bill.
Title: Re: IDEA: Auto-Tile open windows.
Post by: JennyB on September 07, 2007, 12:15 PM
try moving the taskbar to the left hand side, make it wider, then make the background transparent (would need tool). then use auto-tile :) comes close i think.

Kinda, sorta. I do put the taskbar on the side when I have to use plain Windows, but I prefer to use bbLean as a shell, and that doesn't support the Windows tiling commands >:( Gridmove works though, and it has its own workspaces.  :-*