Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Cut away parts of a window


  • Please log in to reply
16 replies to this topic
skrommel
  • Members
  • 193 posts
  • Last active: Jun 07 2010 08:30 AM
  • Joined: 30 Jul 2004
How about extending WinSet to set the ClipRect of a windows to cut away the border around video windows and more?

skrommel

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Do you mean call SetWindowRgn() on some other window? Do you know that this actually works on windows owned by other processes?

By the way, I'm still planning to put your uber-mouse script into the script showcase someday. If you've made any improvements you'd like included, please let me know.

Thanks.

skrommel
  • Members
  • 193 posts
  • Last active: Jun 07 2010 08:30 AM
  • Joined: 30 Jul 2004
PeepShow from <!-- m -->http://www.progency.com<!-- m --> does this, but it uses both left and right buttons, so I can't use it.

Thank's for remembering my script! I use AutoHotKey on a daily basis, but I haven't had time to look into all the new functions you've added. You shure keep busy.

Have you tried Gui4Cli from <!-- m -->http://users.hol.gr/~dck/g4c<!-- m --> ? It's an advanced version of your Gui functions, but it's much harder to use, and the documentation is so so. Actually, I think Autohotkeys documentation should get an award, it really makes all the difference!

Skrommel

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

PeepShow from <!-- m -->http://www.progency.com<!-- m --> does this, but it uses both left and right buttons, so I can't use it.

Thanks for the reference. I'll check if there is some simple method to trim down the size of a window, perhaps SetWindowRgn().

Have you tried Gui4Cli from <!-- m -->http://users.hol.gr/~dck/g4c<!-- m --> ?

I've seen a little of what it can do and it's very nice. Certainly, there was never an intent to make AutoHotkey's GUI capabilities into anything so elaborate.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
The ability to change the shape of any window has been added via "WinSet Region". Thanks for the idea.

Really complex shapes might be impossible, but such capabilities could be added in the future if anyone has a need.

If anyone discovers any problems with it, please let me know.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
it looks nice and is fun, but what are its real world uses?... i mean real, practical ones... not like u'd want to watch that window in BG and work on this one..

Edit : fixed typo with jonny's help

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004

watch that widow in BG and work on this one..


I'm not sure about the uses, but I don't think watching widows should count... :lol:


Eh, creepy.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
yeah very funny! Posted Image

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004

it looks nice and is fun, but what are its real world uses?... i mean real, practical ones... not like u'd want to watch that window in BG and work on this one..


Nothing?
Chris?

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Well, when it was asked for at the top here, one of the uses was to cut away the borders of a video player so that you could see just the video (perhaps a video or flash playing in a browser window).

Other than that, this feature is another example of something I started working just to assess how much work would be involved. But what usually happens is I get a little obsessed during this process, and wind up spending many hours to get it finished even though my original intent was to spend no more than an hour.

In the coming weeks, I'm going to try to get back on track and focus more on the high priority features such as function calling.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004

In the coming weeks, I'm going to try to get back on track and focus more on the high priority features such as function calling.

actually seeing this function added really made me think that maybe its just me who is not seeing the light... knowing u i thought it must be having some great use! :)

by the way unless the window is permanently assigned a single skin (not the std windows look), the cutting away of borders will make it look strange with different themes etc.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


skrommel
  • Members
  • 193 posts
  • Last active: Jun 07 2010 08:30 AM
  • Joined: 30 Jul 2004
Thank you, Chris, for waisting your time on our every wish!

Now I can make my video windows fit anywhere! Automatically! And combined with the Easy Window Dragging from your Showcase, life is good!

Skrommel

  • Guests
  • Last active:
  • Joined: --
Sorry to waste everybodys time, but

WinSet, Region,, WinTitle ; Restore the window to its original/default display area.

has a bug!

If you maximize a window after it has had it's region changed in it's restored state, it will get a region as big as it's restored window.

I can live with this. Just thought I'd let you know.

Skrommel

;CutAway
;Cut away parts of a window using the left mouse button.
;Undo the cutting with the right mouse button.

Window=noclick

START:
MouseGetPos,x1,y1,window
x1+=15
y1+=15
ToolTip,Leftclick and drag to cut`nRightclick or ESC to undo,%x1%,%y1%
Goto,START

LButton::
ToolTip
LOOP:
MouseGetPos,x2,y2
x2-=%x1%
y2-=%y1%
If x2<0
{
  x2-=1
  If x2>-30
    x2=-30
}
else
{
  x2+=1
  If x2<30
     x2=30
}
If y2<0
{
  y2-=1
  If y2>-30
    y2=-30
}
else
{
  y2+=1
  If y2<30
     y2=30
}
WinSet,Region,%x1%-%y1% W%x2% H%y2%,ahk_id %window%
GetKeyState,LButtonState,LButton,P
If LButtonState = U
  ExitApp
Goto,LOOP
Return

ESC::
RButton::
If window=noclick
  MouseGetPos,,,window
WinSet,Region,,ahk_id %window%
ExitApp


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Thanks for the script. This issue has hopefully been fixed in today's update.

skrommel
  • Members
  • 193 posts
  • Last active: Jun 07 2010 08:30 AM
  • Joined: 30 Jul 2004
Wow, your fast! Works!

Skrommel