Flipp Posted April 9, 2009 Share Posted April 9, 2009 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! Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 9, 2009 Share Posted April 9, 2009 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. 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 Link to comment Share on other sites More sharing options...
Flipp Posted April 13, 2009 Author Share Posted April 13, 2009 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. 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? Link to comment Share on other sites More sharing options...
ResNullius Posted April 14, 2009 Share Posted April 14, 2009 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. Link to comment Share on other sites More sharing options...
KaFu Posted April 14, 2009 Share Posted April 14, 2009 (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 April 14, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Flipp Posted May 1, 2009 Author Share Posted May 1, 2009 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! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now