Jump to content

DllCall or captdll.dllProblem


Recommended Posts

Unusual problem, have spent about a day on this.

Code below maxmises the IE window, gets its dimensions, fires a msgbox (doesnt have to be there but part of my error checking) then captures the IE window and saves it to the desktop.

This is all fine. :rambo:

However nothing that comes next in the code works, no error (>Exit code: 0 Time: 28.643), just exit. The MsgBox(0, "Title 2", "check for file 2") is not called nor anything that I put after the DllCall. :rolleyes:

I am sure I am overlooking something very obvious, thanks all the same!

Code below:

CODE

WinSetState("TITLE - Microsoft Internet Explorer", "", @SW_MAXIMIZE)

Local $Cwin1 = WinGetHandle(""); gets the handle of the active window

Local $Cwin2 = WinGetPos($Cwin1); gets active window dimensions

MsgBox(0, "Title 1", "check for file 1")

$fileMoniker = "ABC_123.jpg"

$dllCap = DllOpen(@ScriptDir & "\captdll.dll") ;this dll is in the same file as the script

DllCall($dllCap, "int", "CaptureRegion", "str", "C:\Documents and Settings\jezandrews\Desktop\" & $fileMoniker, "int", $Cwin2[0], "int", $Cwin2[1], "int", $Cwin2[2], "int", $Cwin2[3], "int", 85)

DllClose($dllCap); realise that some documentation says dll open/close can be redundant if you use dllcall to overcome have tried both methods

MsgBox(0, "Title 2", "check for file 2") ; this (or any other code here) is never executed!

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