WBHIIHPP Posted January 18 Share Posted January 18 I have a project that opens an application and then opens windows magnifier and zooms in on a certain area of the application. After the zoom is finished I would like to minimize the Magnifier tool but, I am unable to make that happen. I have tried using mousemove and mouse click to click the minimize button and I have tried the following: ;Opens the Windows Magnifier Send("#=") ;Wait 200 msec Sleep(200) ;Minimize tbe Mangnifier Tool WinSetState("Magnifier","",@SW_HIDE) Any ideas on why these approaches will not work? Link to comment Share on other sites More sharing options...
OJBakker Posted January 18 Share Posted January 18 Check the returnvalue of winsetstate. If the focus is still on the magnifier you can minimize the window with WinKey - Down arrow, in code: Send("#{DOWN}") Link to comment Share on other sites More sharing options...
Solution Andreik Posted January 18 Solution Share Posted January 18 (edited) #include <SendMessage.au3> Local $WM_SYSCOMMAND = 0x0112 Local $SC_MINIMIZE = 0xF020 Send('#=') WinWait('Magnifier') Sleep(2000) _SendMessage(WinGetHandle('Magnifier'), $WM_SYSCOMMAND, $SC_MINIMIZE, 0) Edited January 18 by Andreik Xandy 1 Link to comment Share on other sites More sharing options...
Werty Posted January 22 Share Posted January 22 (edited) As an alternative to windows magnifier you can use autoIt itself, the windows magnifier is not very good, very slow responding, whereas an AutoIt version is much faster, check it out... #include <WinAPI.au3> HotKeySet("{ESC}", "_exit") $Gui = GUICreate("Magnifier", 512, 512, -1, -1) GUISetState() Global $DesktopDC = _WinAPI_GetDC(0) Global $GuiDC = _WinAPI_GetDC($Gui) ;------------------------------------------------------------------------------ WHILE 1 _WinAPI_StretchBlt($GuiDC, 0, 0, 512, 512, $DesktopDC, MouseGetPos()[0]-64, MouseGetPos()[1]-64, 128, 128, 0x00CC0020) Sleep(10) WEND ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ Func _exit() Exit EndFunc ;------------------------------------------------------------------------------ You can even hold the mouse over a playing movie and it updates instantly, windows magnifier cant do that. Edited January 22 by Werty Some guy's script + some other guy's script = my script! 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