doodilido Posted August 12, 2018 Share Posted August 12, 2018 #include <Misc.au3> #include <AutoItConstants.au3> #include <ScreenCapture.au3> screenshot() Func screenshot() if _IsPressed("01") Then $MousePos1 = MouseGetPos() While True While _IsPressed("01") Sleep(10) WEnd $MousePos2 = MouseGetPos() _ScreenCapture_Capture("test.bmp", $Mousepos1[0], $Mousepos1[1], $Mousepos2[0], $Mousepos2[1]) return False Sleep(10) WEnd EndIf EndFunc I have this code and i want to know how to take a screenhsot over an area without it changing. in other words not trigger hover events. thankfull for any response Link to comment Share on other sites More sharing options...
careca Posted August 12, 2018 Share Posted August 12, 2018 You can take a screenshot of the whole area and crop it, but if the idea is to make it work like the windows snipping tool, maybe if your GUI is the top window the hover events are not triggered, but im not sure, the way i would try to do this would be making the gui temporarily small, or even move it off screen, during the coordinates grab, and then i would move the mouse to the first point, use a keyboard key instead of the mouse, to keep focus on my gui, and in the second point press the keyboard again, similarly like your script does, that would possibly work. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
jdelaney Posted August 12, 2018 Share Posted August 12, 2018 (edited) Use a different _ispressed key. One that won't cause focus to the window. Or, maybe something like this...it assumes that the window isn't present at 0,0: #include <Misc.au3> #include <AutoItConstants.au3> #include <ScreenCapture.au3> screenshot() Func screenshot() if _IsPressed("01") Then $MousePos1 = MouseGetPos() While True While _IsPressed("01") Sleep(10) WEnd $MousePos2 = MouseGetPos() MouseMove(0,0,0) _ScreenCapture_Capture("test.bmp", $Mousepos1[0], $Mousepos1[1], $Mousepos2[0], $Mousepos2[1]) return False Sleep(10) WEnd EndIf EndFunc Edited August 12, 2018 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. 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