Ventureraider Posted December 18, 2005 Share Posted December 18, 2005 I need to know how to detect if there is a non-mmb program in fullscreen, like for example MSN Messenger detects it to switch you to Away status automatically. Thanks Link to comment Share on other sites More sharing options...
LxP Posted December 19, 2005 Share Posted December 19, 2005 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 More sharing options...
Ventureraider Posted December 19, 2005 Author Share Posted December 19, 2005 ; 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 More sharing options...
LxP Posted December 19, 2005 Share Posted December 19, 2005 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 autoitPlacing #NoTrayIcon at the start of your script will do this. 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