Sign in to follow this  
Followers 0
Flipp

Detecting Application Full Screen Mode (XP)

6 posts in this topic

Hi All!

I have been looking for some way to detect if an application is running in Full Screen Mode so that I could suppress GUI Controls. For example, Windows Media Player or MS PowerPoint.

Has anyone been able to do this with AutoIt before? Perhaps outside of AutoIt?

Thank you in advance!

Share this post


Link to post
Share on other sites



Hi All!

I have been looking for some way to detect if an application is running in Full Screen Mode so that I could suppress GUI Controls. For example, Windows Media Player or MS PowerPoint.

Has anyone been able to do this with AutoIt before? Perhaps outside of AutoIt?

Thank you in advance!

WinGetHandle() to get the handle of the current active window, then use WinGetState() to see if it's maximized. You could also get a list of all windows with WinList() and see if any of them were maximized.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

WinGetHandle() to get the handle of the current active window, then use WinGetState() to see if it's maximized. You could also get a list of all windows with WinList() and see if any of them were maximized.

:D

Thanks for the reply.

I tried your suggestion above using PowerPoint as a test case in Presentation Mode and the returned state was 15 for when in this mode and in Maximise so I can not rely on this for what I am after as I am after a Full-Screen Mode which I cant get AutoIt to recognize.

Any other ideas?

Share this post


Link to post
Share on other sites

Thanks for the reply.

I tried your suggestion above using PowerPoint as a test case in Presentation Mode and the returned state was 15 for when in this mode and in Maximise so I can not rely on this for what I am after as I am after a Full-Screen Mode which I cant get AutoIt to recognize.

Any other ideas?

Read the help file under WinGetState().

You have to examine the return with BitAnd() to test for the state you're interested in.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Try this one:

HotKeySet("{ESC}","_exit")
HotKeySet("{F1}","_size")

while 1
    sleep(10)
wend

func _exit()
    Exit
EndFunc

func _size()
    $size = WinGetPos("[active]")
    if $size[0] = 0 AND $size[1] = 0 AND $size[2] = @DesktopWidth AND $size[3] = @DesktopHeight then
        MsgBox(0, "Active window stats (x,y,width,height)", "Active window IS Fullscreen" & @crlf & @crlf & $size[0] & " " & $size[1] & " " & $size[2] & " " & $size[3])
    Else
        MsgBox(0, "Active window stats (x,y,width,height)", "Active window IS NOT Fullscreen" & @crlf & @crlf & $size[0] & " " & $size[1] & " " & $size[2] & " " & $size[3])
    endif
EndFunc
Edited by KaFu

Share this post


Link to post
Share on other sites

Read the help file under WinGetState().

You have to examine the return with BitAnd() to test for the state you're interested in.

Perfect!

Thanks for the code and advice!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0