Jump to content

screen capture isn't affected my mousecoordmode?


Recommended Posts

I have Opt("MouseCoordMode", 2) yet the screen capture is still based off of the screen coordinates. Am I doing something stupid and not realizing it or is there an issue here? Here is my script for printing a section of my gui. I can make it work, but I'm wondering why it doesn't work already the way it is.

$hbmp = _ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image2.jpg",$width-(($height-50)*(5/6)+25),25,($width-(($height-50)*(5/6)+25)) + ($height-50)*(5/6),25 + $height-50,False)
        _ScreenCapture_SaveImage (@MyDocumentsDir & "\GDIPlus_Image2.jpg", $hBmp)
        $sPrintFile = @MyDocumentsDir & "\GDIPlus_Image2.jpg"
        Run('Rundll32.exe "' & @SystemDir & '\mshtml.dll",PrintHTML "' & $sPrintFile & '"', @SystemDir)
        WinWaitActive("Print")
        FileDelete(@MyDocumentsDir & "\GDIPlus_Image2.jpg")

Giggity

Link to comment
Share on other sites

_ScreenCapture_Capture isn't affected by MouseCoordMode.

You mentioned you are trying to print only a section of your gui. Are you deriving $height and $width from the mouse position?

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Link to comment
Share on other sites

No they are predefined earlier in the script by the screen size. The math is to define the possition of the area I want to print, it is the same math I used to place the object. I fixed it using more math, I was just kind of confused as to why regardless screen capture went by screen coords.

Giggity

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...