jezandrews Posted June 14, 2007 Share Posted June 14, 2007 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. 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. 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 More sharing options...
poisonkiller Posted June 14, 2007 Share Posted June 14, 2007 Try putting DllCall second parameter "int:cdecl". Link to comment Share on other sites More sharing options...
jezandrews Posted June 14, 2007 Author Share Posted June 14, 2007 You sir are a prince amongst men, a king amongst princes and a god among mortals! Thank you. 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