Jump to content

Recommended Posts

Posted

I installed wipedisk and also unable to get the textline you are looking for. Somehow you cannot get into the childs of the TGroupbox.

However you can analyse that specific area with function(s) in 

'?do=embed' frameborder='0' data-embedContent>>

or search forum for

_GDIPlus_BitmapLockBits

As you need to analyse a small area you probably can make your own special Optical Character Recognition

@junkew, ... thanks for your comments.

I made a simple script to beep, if the sector-count stopped.

;~ WipeDisk+
#include <Array.au3>
#include <winapiex.au3>
#include <ScreenCapture.au3>
#include <GDIPlus.au3>
#include <WinAPIGdi.au3>
Global $handleW, $handleG, $x1, $y1, $x2, $y2, $Buffersize, $tagSTRUCT1, $tSTRUCT1, $pointer, $hBitmap
Global $Array1[1], $Array2[1], $Array3[1]

OnAutoItExitRegister(_Exit)
Func _Exit()
    _WinAPI_DeleteObject($hBitmap)
    _GDIPlus_Shutdown()
EndFunc   ;==>_Exit

Exit _Main()

Func _Main()
    _prolog()
    While Sleep(2000)
        $Array2 = _GetArray()
        For $i = 1 To $Array2[0]
            If $Array2[$i] <> $Array3[$i] Then ExitLoop
        Next
        If $i > $Array2[0] Then Beep(3000, 20) ; alert stop of counter
        $Array3 = $Array2
    WEnd
EndFunc   ;==>_Main

Func _prolog()
    _GDIPlus_Startup()
    $handleW = (WinWait("[REGEXPTITLE:WipeDisk; CLASS:TfrmMain]", "", 2) ? (WinActivate("[LAST]") ? WinWaitActive("[LAST]") : 0) : SetError(1, 0, 0))
    If Not $handleW Then Exit MsgBox(16 + 262144, " ", "Cannot find Wipedisk window", 0)
    $x1 = 205
    $y1 = 44
    $x2 = 294
    $y2 = 53
    $Buffersize = ($x2 - $x1 + 1) * ($y2 - $y1 + 1) * 4
    ReDim $Array1[$Buffersize + 1]
    ReDim $Array2[$Buffersize + 1]
    ReDim $Array3[$Buffersize + 1]
    $tagSTRUCT1 = "struct;char buffer[" & $Buffersize & "];endstruct"
    $tSTRUCT1 = DllStructCreate($tagSTRUCT1)
    $pointer = DllStructGetPtr($tSTRUCT1)
    $handleG = ControlGetHandle($handleW, "", "TGroupBox3")
    $Array2 = _GetArray()
    $Array3 = $Array2
EndFunc   ;==>_prolog

Func _GetArray()
    WinSetState($handleW, "", @SW_RESTORE)
    WinActivate($handleW)
    _WinAPI_DeleteObject($hBitmap)
;~  $hBitmap = _ScreenCapture_CaptureWnd(@ScriptFullPath & ".bmp", $handleG, $x1, $y1, $x2, $y2)
;~  ShellExecute(@ScriptFullPath & ".bmp")
;~  Exit
;~  _WinAPI_DeleteObject($hBitmap)
    $hBitmap = _ScreenCapture_CaptureWnd("", $handleG, $x1, $y1, $x2, $y2)
    $rc = _WinAPI_GetBitmapBits($hBitmap, $Buffersize, $pointer)
    $Array1[0] = $rc
    For $i = 1 To $rc
        $Array1[$i] = DllStructGetData($tSTRUCT1, "buffer", $i)
    Next
    Return $Array1
EndFunc   ;==>_GetArray

App: Au3toCmd              UDF: _SingleScript()                             

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
×
×
  • Create New...