AutoHotkey Community

It is currently May 26th, 2012, 10:01 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: September 23rd, 2009, 7:56 am 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6065
Location: San Diego, California
The following "Winset, Region" code works on my XP system but incorrectly on Vista.
Using Notepad as the active window, the client area is reduced, but the frame/border around the application remains.
Notice the blue frame and the close/min/max buttons still visible? http://www.autohotkey.net/~Leef_me/winset_problem.jpg
BTW, after 5 seconds the active window IS restored correctly.

:?: Can several people run the script and report OS and whether the frame is hidden or left visible?

If you have an answer why/work-around I welcome that as well.

Thanks in advance.

Leef_me
Code:
CoordMode, mouse, Screen

msgbox Press #q to make active window smaller
return

;----------- Operate by hotkey, Win-q
#q::

;----------- find the title and coordinates of active window
WinGetActiveTitle, OutputVar
WinGetPos , X, Y, Width, Height, %OutputVar%


;----------- move to UL and LR diagonal corners to show size
sleep, 1000
mousemove, %x%, %y%, 20

sleep, 1000
x1:=x+width
y1:=y+height
mousemove, %x1%, %y1%, 20

sleep, 1000

;----------- half the width, half the height, change visible region

w:= Width/2
h:= Height/2

WinSet, Region , 0-0 w%w% h%h% , %OutputVar%

sleep, 5000

;----------- restore visible region

WinSet, Region ,  , %OutputVar%

return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 23rd, 2009, 9:07 am 
Offline

Joined: January 12th, 2007, 4:30 am
Posts: 531
Location: Norway
Leef_me: Why double post?? The script works like a charm for me on Windows XP Pro. SP2. It nicely sliced my Notepad in half.

P.S. I know it's silly, but I liked the way the mouse slowly moved from one corner of the window to the other.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 23rd, 2009, 9:30 am 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
It does what expected at my winXP computer.
The maximize minimize buttons are away.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 23rd, 2009, 5:49 pm 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6065
Location: San Diego, California
@Murple
Yes, I hate D.P. but it appeared the original thread was no longer being seen.
I need some 'trials' to confirm or deny my theory that it is Vista based.

Thanks for your response.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: RE: Script Test on Vista
PostPosted: September 24th, 2009, 2:48 am 
Offline

Joined: August 22nd, 2009, 11:23 pm
Posts: 294
Hi Leef_me,

I tested your script in Vista, Sp1 and it works fine. :lol:

Good Luck

_________________
Image
"Man's quest for knowledge is an expanding series whose limit is infinity"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2009, 5:01 pm 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6065
Location: San Diego, California
Bump, just a quick test. Takes 5 minutes max!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2009, 8:43 pm 
Offline

Joined: February 7th, 2008, 9:48 pm
Posts: 509
works like you want it in XP SP3 :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re:
PostPosted: September 26th, 2009, 9:25 pm 
Offline

Joined: January 10th, 2009, 6:40 pm
Posts: 32
On XP SP2: Works fine

On Vista: Not working, tried with notepad, firefox, same problem as on the screenshot.
On autohotkeys debugging window on the other hand, it worked like a charm.

Cheers,

gahks


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2009, 5:35 pm 
Offline

Joined: December 17th, 2007, 6:39 pm
Posts: 235
Location: Galati, Romania
I don't think this is actually a problem, but the way WinVista behaves to the function...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2009, 5:40 pm 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
i think it probably depends on if you have transparency enabled

_________________
Image
ʞɔпɟ əɥʇ ʇɐɥʍ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2009, 6:37 pm 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6065
Location: San Diego, California
Petru wrote:
I don't think this is actually a problem, but the way WinVista behaves to the function...

You don't consider that a problem :shock: :lol:

ahklerner wrote:
i think it probably depends on if you have transparency enabled

Thanks, that seems to be the first direct clue. I'll investigate.

:arrow: BTW, neither of you bothered to post your results. :roll:

Leef_me


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: dra, Exabot [Bot], Google Feedfetcher, hyper_, JSLover, Leef_me, patgenn123 and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group