Page 1 of 1 1
Topic Options
#196147 - 2009-09-29 10:57 PM Setfocus restores window size
Gerald_G Offline
Fresh Scripter

Registered: 2005-04-11
Posts: 34
Loc: Canada
Is it normal for Setfocus to change a maximized application back to the restored size?

I don't think the docs say it will, and I can't find a reference here using search. Maybe it's an odd application.

Top
#196150 - 2009-09-30 12:18 AM Re: Setfocus restores window size [Re: Gerald_G]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
I don't know. I just tested it.
  • If the window is first maximized and than minimized, than the window gets maximized.
  • If the window is maximized, than the window gets restored.

I tested this with 4.60 and 4.61

Top
#196152 - 2009-09-30 01:17 AM Re: Setfocus restores window size [Re: Witto]
Gerald_G Offline
Fresh Scripter

Registered: 2005-04-11
Posts: 34
Loc: Canada
I'm running 4.60

Seems odd, wish it would leave current state.
I DL AutoIT to play with, I don't know the syntax yet, but it looks OK.
It can set the focus without changing state, but seems no more solid at sending keys than kix.

Top
#196154 - 2009-09-30 08:50 AM Re: Setfocus restores window size [Re: Gerald_G]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
I do not really like SendKeys. I presume you want to automate something? Most of the time, there arebetter ways.
Just ask your real question and maybe someone has an answer.

Top
#196158 - 2009-09-30 05:01 PM Re: Setfocus restores window size [Re: Witto]
Gerald_G Offline
Fresh Scripter

Registered: 2005-04-11
Posts: 34
Loc: Canada
My real question is "can setfocus be used without resizing the window?"
Top
#196183 - 2009-10-01 12:01 PM Re: Setfocus restores window size [Re: Gerald_G]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Can a moderator tell if this a "hidden feature" or a "bug" or if Gerald_G should do a suggestion?
Top
#196184 - 2009-10-01 12:12 PM Re: Setfocus restores window size [Re: Witto]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
As far as I know there is no hidden option to let SetFocus leave the window as it is. The fact that it resizes the window is a bug or at least unwanted behaviour imho.

Tested with all version from 4.61 back to 4.50 and the all do the same.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#196187 - 2009-10-01 12:42 PM Re: Setfocus restores window size [Re: Mart]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
I guess that tells you how rarely anyone uses the SendKeys capability any more.

I'd suggest we post it as a potential bug and see what Ruud says.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#196189 - 2009-10-01 01:21 PM Re: Setfocus restores window size [Re: Glenn Barnas]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Originally Posted By: Glenn Barnas
I guess that tells you how rarely anyone uses the SendKeys capability any more.

I'd suggest we post it as a potential bug and see what Ruud says.

Glenn


If you mean SetFocus then I agree ;\)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#196190 - 2009-10-01 01:24 PM Re: Setfocus restores window size [Re: Mart]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Gerald_G
Do you need SendKeys()? If yes, what do you want to do?

Top
#196206 - 2009-10-01 06:37 PM Re: Setfocus restores window size [Re: Mart]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
No - I meant Sendkeys, which is probably the most common reason to use SetFocus from within Kix. If SendKeys was used more often, we'd have seen the SetFocus issue much sooner. I haven't made a SetFocus call since I stopped using Sendkeys about 8 years ago.

The bug is within SetFocus and should be documented accordingly.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#196210 - 2009-10-01 11:00 PM Re: Setfocus restores window size [Re: Glenn Barnas]
Gerald_G Offline
Fresh Scripter

Registered: 2005-04-11
Posts: 34
Loc: Canada
issue a beep to alert me that an app needs attention, and then set focus would be enough.

No NEED to send keys at this point.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.066 seconds in which 0.037 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org