Jump to content

Detect a fullscreen mode


Recommended Posts

This might do it (if not, could you please clarify what MMB means?):

; Get the size of the active window
Local $Dimensions = WinGetPos('')
Local $WinWidth = $Dimensions[2]
Local $WinHeight = $Dimensions[3]

; Compare to the desktop size
If $WinWidth >= @DesktopWidth And $WinHeight >= @DesktopHeight Then
; Code to run if full-screen
    MsgBox(0x40, 'Full-Screen Test', 'A full-screen window is active.')
Else
; Code to run if NOT full-screen
    MsgBox(0x40, 'Full-Screen Test', 'A full-screen window is NOT active.')
EndIf
Link to comment
Share on other sites

; Get the size of the active window

Local $Dimensions = WinGetPos('<Here the window title?>')

Local $WinWidth = $Dimensions[2]

Local $WinHeight = $Dimensions[3]

; Compare to the desktop size

If $WinWidth >= @DesktopWidth And $WinHeight >= @DesktopHeight Then

; Code to run if full-screen

MsgBox(0x40, 'Full-Screen Test', 'A full-screen window is active.')

Else

; Code to run if NOT full-screen

MsgBox(0x40, 'Full-Screen Test', 'A full-screen window is NOT active.')

EndIf

If Local $Dimensions = WinGetPos('Here the window title')

How to send the name of window title with args to other aplication?

I need too hide the tray icon of autoit

More thanks

Link to comment
Share on other sites

You don't need to reference the window title -- the code will work with the active window.

If you want to use the title then you can use WinGetTitle():

; Get the size of the active window
Local $Dimensions = WinGetPos('')
Local $WinWidth = $Dimensions[2]
Local $WinHeight = $Dimensions[3]

; Get the title of the active window
Local $Title = WinGetTitle('')

; Compare to the desktop size
If $WinWidth >= @DesktopWidth And $WinHeight >= @DesktopHeight Then
; Code to run if full-screen
    MsgBox(0x40, 'Full-Screen Test', 'The active window is full-screen:' & @LF & $Title)
Else
; Code to run if NOT full-screen
    MsgBox(0x40, 'Full-Screen Test', 'The active window is NOT full-screen:' & @LF & $Title)
EndIf

How to send the name of window title with args to other aplication?

Maybe this will give you an idea:

; Get the title of the active window
Local $Title = WinGetTitle('')

; Send the title as keys to another window
WinActivate('<Other window>')
Send($Title)

; Start another program passing the window title as an argument
Run('C:\Program.exe ' & $Title)

I need too hide the tray icon of autoit

Placing #NoTrayIcon at the start of your script will do this.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...