Sets or queries the debug level.
#Include <PowerPoint.au3>
_PPT_ErrorNotify($iDebug[, $sDebugFile = @ScriptDir & "\PowerPoint_Debug.txt"])
Parameters
$iDebug | Debug level. Possible values are: -1 - Return the current settings 0 - Disable debugging 1 - Enable debugging. Output the debug info to the console 2 - Enable Debugging. Output the debug info to a MsgBox 3 - Enable Debugging. Output the debug info to a file defined by $sDebugFile 4 - Enable Debugging. The COM errors will be handled (the script no longer crashes) without any output |
$sDebugFile | [optional] File to write the debugging info to if $iDebug = 3 (default = @ScriptDir & "\PowerPoint_Debug.txt") |
Return Value
Success (for $iDebug => 0): 1, sets @extended to:
Remarks
None.
Related
Example
#AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y
#include <Array.au3>
#include <PowerPoint.au3>
#include <MsgBoxConstants.au3>
; *************************
; Create application object
; *************************
Global $oPPT = _PPT_Open()
If @error Then Exit MsgBox($MB_ICONERROR, "PowerPoint Example Skript", "Function _PPT_Open encountered a problem. @error = " & @error & ", @extended = " & @extended)
; ************************************
; Example 1
; Set the debugging options to MsgBox.
; ************************************
_PPT_ErrorNotify(2)
If @error Then MsgBox($MB_ICONERROR, "PowerPoint Example Skript", "Function _PPT_ErrorNotify encountered a problem. @error = " & @error & ", @extended = " & @extended)
; Provoke a COM error
$oPPT.xyz
; ************************************************************
; Example 2
; Set the debugging option to file and set the filename.
; Query the debugging options and display the resulting array.
; ************************************************************
; Set the debugging options
_PPT_ErrorNotify(3, "C:\temp\PPT_Logging.txt")
If @error Then MsgBox(16, "PowerPoint Example Skript", "Function _PPT_ErrorNotify encountered a problem. @error = " & @error & ", @extended = " & @extended)
; Query the debugging options
Global $aResult = _PPT_ErrorNotify(-1)
If @error Then MsgBox(16, "PowerPoint Example Skript", "Function _PPT_ErrorNotify encountered a problem. @error = " & @error & ", @extended = " & @extended)
_ArrayDisplay($aResult)
; Close PowerPoint
_PPT_Close($oPPT)