AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Determining Screen size

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
wakewatcher



Joined: 15 Jul 2006
Posts: 139

PostPosted: Wed May 09, 2007 10:04 pm    Post subject: Determining Screen size Reply with quote

I've got some code that runs quicktimes in a browers. I scale the video to fit the browers in my previous version I did this:
Code:

  splitpath, A_WorkingDir,playfoldername 
  WinMaximize %playfoldername%
  WinGetActiveStats, title,width,height,X,Y
  if (width < 1470)
    GoSub ScaleIt
 

This seemed to work ok as the maximization of the window wasn't noticeable. However now I've added a Gui front end and now it tries to maximize the Gui form instead of an explorer window. In fact to make it work I changed it to:
Code:
  Gui, Show, Maximize 
  WinGetActiveStats, title,width,height,X,Y
  Gui, Show, Restore
  if (width < 1470)
    GoSub ScaleIt
A couple of things. The gui form distractedly maximizes and then restores and basically there has to be a better way to determine the screen size. Suggestions?
Back to top
View user's profile Send private message
atnbueno



Joined: 24 Mar 2007
Posts: 26

PostPosted: Wed May 09, 2007 11:08 pm    Post subject: Reply with quote

How about SysGet?
_________________
Regards,
Antonio
Back to top
View user's profile Send private message Visit poster's website
wakewatcher



Joined: 15 Jul 2006
Posts: 139

PostPosted: Wed May 09, 2007 11:20 pm    Post subject: Reply with quote

Very Cool.
Code:
SysGet, Width,16
Seem to do the trick! Thx.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group