b1nary0mega
1/7/2016 - 3:00 PM

Automate the NL Audit clicks and then take screenshots of it.

Automate the NL Audit clicks and then take screenshots of it.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_x64=NLAuditAutomate.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409)  ---

#include <ScreenCapture.au3>

#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
If $aResult[1] <> '00000409' Then
  MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $aResult[1] & ')')
EndIf

EndFunc

Func _WinWaitActivate($title,$text,$timeout=0)
	WinWait($title,$text,$timeout)
	If Not WinActive($title,$text) Then WinActivate($title,$text)
	WinWaitActive($title,$text,$timeout)
EndFunc

_AU3RecordSetup()
#endregion --- Internal functions Au3Recorder End ---

for $i = 1 to 39 Step +1
	_WinWaitActivate("AD NL Auditing Tool - Internet Explorer","")
	MouseClick("left",219,352,1)
	Send("{DOWN}{ENTER}")
	MouseClick("left",56,472,1)
	Sleep(5000)
	; Capture full screen
    _ScreenCapture_Capture(@MyDocumentsDir & "\NLAuditCapture-" & $i & ".jpg", 1932, 67, 2902, 912, False)
    ShellExecute(@MyDocumentsDir & "\NLAuditCapture-" & $i & ".jpg")
Next
#endregion --- Au3Recorder generated code End ---