Skip to content

Commit

Permalink
Changed: Add boolean to config for maximize window in case of taken s…
Browse files Browse the repository at this point in the history
…creenshot.
  • Loading branch information
sven.seyfert committed Oct 1, 2021
1 parent 56e8c04 commit f38233c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
Binary file modified build/Au3LogFramework.exe
Binary file not shown.
3 changes: 2 additions & 1 deletion config/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
AmountOfLastReportsToStore = 20
Debug = False
DisplayResolutionForScreenshots = 1920x1080
MaximizeWindowInCaseOfTakenScreenshot = True
ShouldDisplayResolutionBeAdjusted = False
SilentModeWithoutMsgBoxes = False
TestRunner = NUnit 3.12.0
TestRunner = SpecFlowPlusRunner net5.0

[Storage]
CountError = -
Expand Down
4 changes: 2 additions & 2 deletions src/Au3LogFramework.au3
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=y
#AutoIt3Wrapper_Icon=..\media\favicon.ico
#AutoIt3Wrapper_Outfile_x64=..\build\Au3LogFramework.exe
#AutoIt3Wrapper_Res_Description=Au3LogFramework (2021-08-24)
#AutoIt3Wrapper_Res_Fileversion=0.53
#AutoIt3Wrapper_Res_Description=Au3LogFramework (2021-10-01)
#AutoIt3Wrapper_Res_Fileversion=0.54
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=y

Expand Down
1 change: 1 addition & 0 deletions src/Declaration.au3
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Global $iDisplayHeight = @DesktopHeight
Global $iAmountOfLastReportsToStore = IniRead( $aFile[$eConfig], 'Settings', 'AmountOfLastReportsToStore', '20' )
Global $bDebug = IniRead( $aFile[$eConfig], 'Settings', 'Debug', 'False' )
Global $sDisplayResolutionForScreenshots = StringStripWS( IniRead( $aFile[$eConfig], 'Settings', 'DisplayResolutionForScreenshots', '1920x1080' ), 8 )
Global $bMaximizeWindowInCaseOfTakenScreenshot = IniRead( $aFile[$eConfig], 'Settings', 'MaximizeWindowInCaseOfTakenScreenshot', 'True' )
Global $bShouldDisplayResolutionBeAdjusted = IniRead( $aFile[$eConfig], 'Settings', 'ShouldDisplayResolutionBeAdjusted', 'False' )
Global $bSilentModeWithoutMsgBoxes = IniRead( $aFile[$eConfig], 'Settings', 'SilentModeWithoutMsgBoxes', 'False' )
Global $sTestRunner = IniRead( $aFile[$eConfig], 'Settings', 'TestRunner', '' )
Expand Down
6 changes: 5 additions & 1 deletion src/Screenshot.au3
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
Func _createScreenshot()
Local $hProgram = _getWindowHandle( $aCmdArg[$eSystemUnderTestTitle] )
WinActivate( $hProgram )
WinSetState( $hProgram, '', @SW_MAXIMIZE )

If StringLower( $bMaximizeWindowInCaseOfTakenScreenshot ) == 'true' Then
WinSetState( $hProgram, '', @SW_MAXIMIZE )
EndIf

_ScreenCapture_CaptureWnd( $aIni[$eOutputPath] & $sScreenshotTime & $sImageExtension, $hProgram )
EndFunc

Expand Down

0 comments on commit f38233c

Please sign in to comment.