0

I create a function that should wait for specific actual time (every accurate hour) then save screenshot in a folder. It work fine in Windows XP and newer versions, but my working OS is "Win NT SP6".

My Function:

Func Print()
    $count = 1
    $delayloop = 1

    DirCreate("C:\Print")

    While $delayloop = 1
        $PrintMin = 00 ; The minute of PrintScreen
        For $count = 1 To 24
            $loop = 1
            While $loop = 1
                sleep(1000)
                If $PrintMin = @MIN Then
                    Sleep(1000)
                    _ScreenCapture_Capture("C:\Print\Picture " & @HOUR & ".jpg")
                    $loop = 0
                EndIf
            WEnd
            Sleep(60000)
        Next
        sleep(500)
    WEnd
EndFunc

I know that _ScreenCapture_Capture function Requires GDI+ that is not in Win NT.

I found gdiplus.dll and copy it to c:\winnt\system32 folder in Win NT (that is my program execute folder), but when my script reaches the line _ScreenCapture_Capture it suddenly terminates.

Please help me with this problem.

  • I am sure windows was never supposed to have `gdipluss.dll`, at least not with double `s`. Only AutoIt versions v3.2.12.1 and below are supported on NT 4.X - that version does not have such a function. Load DLL manually with DLLCall. See if the DLL has all dependencies met with http://www.dependencywalker.com or similar. – Jack White Dec 09 '18 at 20:02
  • you are right, it's gdiplus.dll (it was typing mistake). I'm using AutoIt versions v3.2.12.1 and it has _ScreenCapture_Capture function (UDF) that needs gdi+ (I've read in the help file). – msgladiator Dec 11 '18 at 06:33
  • Ok, I'm sorry, it turns out I was wrong (deleted the erroneous comment), it *is* supposedly enough to just copy the dll and the function *was* in this version. In that case please see if application event log has any more information about the crash and post it. `Dependecy walker`-related advice is still valid. – Jack White Dec 11 '18 at 18:04

0 Answers0