Jump to content

Recommended Posts

Posted

I was working on:

Func _XML_GetAttrib(ByRef $oXmlDoc, $sXPath, $sAttribute_Name)
    Local $oXML_COM_ErrorHandler = ObjEvent("AutoIt.Error", "__XML_ComErrorHandler_MainFunction")
    #forceref $oXML_COM_ErrorHandler

    _XML_UseEventHandler($oXmlDoc)
    __XML_IsValidObject($oXmlDoc)
    If @error Then Return SetError(@error, @extended, $XMLWRAPPER_RESULT_FAILURE)

    Local $oNode_Selected = $oXmlDoc.selectSingleNode($sXPath)
    If @error Then
        Return SetError($XMLWRAPPER_ERROR_XPATH, 0, $XMLWRAPPER_RESULT_FAILURE)
    EndIf

    If $oNode_Selected = Null Then
        Return SetError($XMLWRAPPER_ERROR_NONODESMATCH, 0, $XMLWRAPPER_RESULT_FAILURE)
    EndIf

    Local $oAttribute = $oNode_Selected.getAttributeNode($sAttribute_Name)
    If IsObj($oAttribute) Then
        Return SetError($XMLWRAPPER_ERROR_OK, 0, $oAttribute.value)
    EndIf

    If $oAttribute = Null Then
        Return SetError($XMLWRAPPER_ERROR_NOATTRMATCH, 0, $XMLWRAPPER_RESULT_FAILURE)
    EndIf

    Return SetError($XMLWRAPPER_ERROR_GENERAL, 0, $XMLWRAPPER_RESULT_FAILURE)

EndFunc   ;==>_XML_GetAttrib

 

and was thinking about such a refactoring:

 

Func _XML_GetAttrib(ByRef $oXmlDoc, $sXPath, $sAttribute_Name)
    Local $oXML_COM_ErrorHandler = ObjEvent("AutoIt.Error", "__XML_ComErrorHandler_MainFunction")
    #forceref $oXML_COM_ErrorHandler

    _XML_UseEventHandler($oXmlDoc)
    __XML_IsValidObject($oXmlDoc)
    If @error Then Return SetError(@error, @extended, $XMLWRAPPER_RESULT_FAILURE)

    Local $oNode_Selected = $oXmlDoc.selectSingleNode($sXPath)
    If @error Then
        Return SetError($XMLWRAPPER_ERROR_XPATH, 0, $XMLWRAPPER_RESULT_FAILURE)
    ElseIf $oNode_Selected = Null Then
        Return SetError($XMLWRAPPER_ERROR_NONODESMATCH, 0, $XMLWRAPPER_RESULT_FAILURE)
    EndIf

    Local $oAttribute = $oNode_Selected.getAttributeNode($sAttribute_Name)
    If IsObj($oAttribute) Then
        Return SetError($XMLWRAPPER_ERROR_OK, 0, $oAttribute.value)
    ElseIf $oAttribute = Null Then
        Return SetError($XMLWRAPPER_ERROR_NOATTRMATCH, 0, $XMLWRAPPER_RESULT_FAILURE)
    EndIf

    Return SetError($XMLWRAPPER_ERROR_GENERAL, 0, $XMLWRAPPER_RESULT_FAILURE)

EndFunc   ;==>_XML_GetAttrib

 

as you see I used ElseIf what you think about ?

Since I'm still at the beginning of the road, then I can from now on, use this approach.
Always a few lines less, and besides a piece of code is intertwined / grouped, making it easier to understand.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

You might want to use an Else in there as well so that the last Return statement is part of the If/Then/Endif conditonal. I'm not sure but it looks like it only hits the last Return statement if everything else hasn't fired off a Return statement first.

BTW, you don't need to use #forceref in this function, it's not needed.

Func _XML_GetAttrib(ByRef $oXmlDoc, $sXPath, $sAttribute_Name)
    Local $oXML_COM_ErrorHandler = ObjEvent("AutoIt.Error", "__XML_ComErrorHandler_MainFunction")
;~   There shouldn't be any need to use #forceref in this function
;~     #forceref $oXML_COM_ErrorHandler

    _XML_UseEventHandler($oXmlDoc)
    __XML_IsValidObject($oXmlDoc)
    If @error Then Return SetError(@error, @extended, $XMLWRAPPER_RESULT_FAILURE)

    Local $oNode_Selected = $oXmlDoc.selectSingleNode($sXPath)
    If @error Then
        Return SetError($XMLWRAPPER_ERROR_XPATH, 0, $XMLWRAPPER_RESULT_FAILURE)
    ElseIf $oNode_Selected = Null Then
        Return SetError($XMLWRAPPER_ERROR_NONODESMATCH, 0, $XMLWRAPPER_RESULT_FAILURE)
    EndIf

    Local $oAttribute = $oNode_Selected.getAttributeNode($sAttribute_Name)
    If IsObj($oAttribute) Then
        Return SetError($XMLWRAPPER_ERROR_OK, 0, $oAttribute.value)
    ElseIf $oAttribute = Null Then
        Return SetError($XMLWRAPPER_ERROR_NOATTRMATCH, 0, $XMLWRAPPER_RESULT_FAILURE)
    Else
        Return SetError($XMLWRAPPER_ERROR_GENERAL, 0, $XMLWRAPPER_RESULT_FAILURE)
    EndIf
EndFunc   ;==>_XML_GetAttrib

 

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted
  On 9/9/2015 at 2:24 AM, KingBob said:

You might want to use an Else in there as well so that the last Return statement is part of the If/Then/Endif conditonal. I'm not sure but it looks like it only hits the last Return statement if everything else hasn't fired off a Return statement first.

Yes you have right.

It could be done even his way:

Local $oNode_Selected = $oXmlDoc.selectSingleNode($sXPath)
    If @error Then
        Return SetError($XMLWRAPPER_ERROR_XPATH, 0, $XMLWRAPPER_RESULT_FAILURE)
    ElseIf $oNode_Selected = Null Then
        Return SetError($XMLWRAPPER_ERROR_NONODESMATCH, 0, $XMLWRAPPER_RESULT_FAILURE)
    Else

        Local $oAttribute = $oNode_Selected.getAttributeNode($sAttribute_Name)
        If IsObj($oAttribute) Then
            Return SetError($XMLWRAPPER_ERROR_OK, 0, $oAttribute.value)
        ElseIf $oAttribute = Null Then
            Return SetError($XMLWRAPPER_ERROR_NOATTRMATCH, 0, $XMLWRAPPER_RESULT_FAILURE)
        Else
            Return SetError($XMLWRAPPER_ERROR_GENERAL, 0, $XMLWRAPPER_RESULT_FAILURE)
        EndIf
    EndIf

Recently I change my habbits and I do not like to go in depth in code structure.
But in this case this is not DEEP .
 

  On 9/9/2015 at 2:24 AM, KingBob said:

BTW, you don't need to use #forceref in this function, it's not needed.

In this snippet yes you have right.
But as a part of UDF it should stay beause I use:

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7

at the begining of this UDF.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

I see that you need to use #forceref when you use the -w 5 parameter, I don't tend to use it myself as it doesn't make any difference to whether the script runs correctly or not.

 

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted (edited)
  On 9/9/2015 at 2:24 AM, KingBob said:

I'm not sure but it looks like it only hits the last Return statement if everything else hasn't fired off a Return statement first.

My logical analysis shows that, this function _XML_GetAttrib() should never invoked $XMLWRAPPER_ERROR_GENERAL.

but as a security system should be used, for any case.

 

  On 9/9/2015 at 2:52 AM, KingBob said:

I see that you need to use #forceref when you use the -w 5 parameter, I don't tend to use it myself as it doesn't make any difference to whether the script runs correctly or not.

But is usefull when you want create clean code with out any garbage (unused variables, constants ....)
So I still use this feature.

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

new version:

  Quote

2015/09/09
"1.1.1.05"
. NEW: ENUMs: $XMLWRAPPER_ERROR_PARSE_XSL - mLipok
. NEW: ENUMs: $XMLWRAPPER_ERROR_NOATTRMATCH - mLipok
. COMPLETED: Function: _XML_RemoveAttribute() - mLipok
. NEW EXAMPLE: _Example_4__XML_RemoveAttribute() - mLipok
. Renamed: _XMLReplaceChild >> _XML_ReplaceChild - mLipok
. COMPLETED: _XML_ReplaceChild - mLipok
. NEW EXAMPLE: _Example_5__XML_ReplaceChild() - mLipok
. NEW: ENUMs: $XMLWRAPPER_ERROR_NOCHILDMATCH - mLipok
. NEW EXAMPLE: _Example_5__XML_ReplaceChild() - mLipok
. NEW EXAMPLE: _Example_6__XML_GetChildNodes() - mLipok
. COMPLETED: _XML_GetChildNodes() - mLipok
. COMPLETED: _XML_GetAllAttribIndex() - mLipok
. NEW Function: _XML_Array_GetAttributesProperties() - mLipok
. NEW EXAMPLE: _Example_7__XML_GetAllAttribIndex() - mLipok
. ADDED: many IsObj() >> https://www.autoitscript.com/forum/topic/177176-why-isobj-0-and-vargettype-object/

Download link. 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

new version:

  Quote

2015/09/11
"1.1.1.06"
. Removed: Function: __XML_Misc_ConsoleNotifier() - mLipok
. Removed: Function: __XML_Misc_MsgBoxNotifier() - mLipok
. Removed: Function: _XML_MiscProperty_Notify() - mLipok
. Removed: Function: _XML_MiscProperty_NotifyToConsole() - mLipok
. Removed: Function: _XML_MiscProperty_NotifyToMsgBox() - mLipok
. Removed: Function: _XML_MiscProperty_NotifyAll() - mLipok
. Removed: Function: __XML_ComErrorHandler_MainFunction() - mLipok
. Removed: Function: __XML_DOM_EVENT_ondataavailable() >> is in example - mLipok
. Removed: Function: __XML_DOM_EVENT_onreadystatechange() >> is in example - mLipok
. Removed: Function: __XML_DOM_EVENT_ontransformnode() >> is in example - mLipok
. Removed: Function: _XML_UseEventHandler() - as event handler should be defined by user in main script - look in examlpes - mLipok
. Removed: Function: _XML_ComErrorHandler_UseInternalAsUser() - mLipok
. Renamed: Function: __XML_ComErrorHandler_UserFunctionName >> ___XML_ComErrorHandler_UserFunctionName - is now internal - mLipok
.        User Function are now passed as parameter to _XML_CreateObject()
. Changed: Examples: XML_Misc_ErrorParser() >> XML_My_ErrorParser() - mLipok
. Changed: Examples to fit to the changed UDF - mLipok
. Modified: Examples: CleanUp +++ Comments - mLipok
. Removed: Function: __AddFormat - as now is _XML_TIDY() function - mLipok
. Removed: Function: _XML_MiscProperty_StaticCOMErrorHandler() - as was not used - mLipok
.
.
. !!!!!! REMARKS: - mLipok
.       It is user choice to set ERROR HANDLER or not.
.        If user do not set it and something goes wrong with COM then this is USER PROBLEM not the NOT UDF ISSUE/ERROR
.     FOR ERROR CHECKING
.        1. check @error
.        2. _XML_ErrorParser_GetDescription()
.        3. setup your COM ERROR HANDLER and pass it as parameter to _XML_CreateObject()
.        4. you can make in your main script function like XML_My_ErrorParser() and use it if you want

 

Download link. 

 

Errate:

  Quote

    .        If user do not set it and something goes wrong with COM then this is USER PROBLEM and NOT UDF ISSUE/ERROR
    .            in such case UDF will call empty function for avoid AutoIt Error

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

Actually I'm wondering about such a question:

Is there any difference in results beetwen this two lines:

$oXmlDoc.documentElement.selectNodes($sXPath)
$oXmlDoc.selectNodes($sXPath)

I think its related with how $sXPath is used.

Any quick explanation ?

Edited by mLipok
wording,

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

new version:

  Quote

2015/09/15
"1.1.1.07"
. Renamed: ENUMs: $eAttributeList_ ..... >> $__g_eARRAY_ATTR_ .... - as now are Global Enums
. Renamed: ENUMs: $eNodeList_ ..... >> $__g_eARRAY_NODE_ .... - as now are Global Enums
. Removed: Function: _XML_MiscProperty_AutoFormat() - as is not used - mLipok
. Removed: Function: _XML_MiscProperty_EventHandling() - as is not used - mLipok
. Removed: Function: _XML_MiscProperty_AutoSave() - as is not used - mLipok
. ADDED NEW: Function: __XML_IsValidObject_Attributes() - mLipok
. ADDED NEW: Function: __XML_IsValidObject_NodesColl() - mLipok
. ADDED NEW: $XMLWRAPPER_EXT_ ... for proper handling @extended information - mLipok
. Changed: Examples: XML_My_ErrorParser() - added support for $XMLWRAPPER_EXT_ ...  - mLipok
. Removed: $sQuery      - DOM compliant query string (not really necessary as it becomes part of the path)
. Changed: All @extended are returned as $XMLWRAPPER_EXT_ .... or @extended - never as 0 or directly as number - mLipok
. REFACTORED: _XML_Tidy() - proper @errors and @extended support - mLipok
. REFACTORED: _XML_Array_GetAttributesProperties() - proper @errors and @extended support - mLipok
. REFACTORED: _XML_Array_GetNodesProperties() - proper @errors and @extended support - mLipok
. REFACTORED: all this following function uses _XML_SelectNodes() - mLipok
.        _XMLCreateChildNode()         _XML_DeleteNode()             _XML_GetAllAttribIndex()
.        _XML_GetParentNodeName()     _XMLSetAttrib()             _XML_UpdateField2()
.        _XMLGetValue()                 _XML_GetNodesCount()         _XML_ReplaceChild()
.        _XML_GetNodesPath()            _XMLGetAllAttrib()
. REFACTORED: all this following function uses _XML_SelectSingleNode() - mLipok
.        _XML_CreateAttribute()         _XML_CreateComment()         _XML_GetAttrib()
.        _XML_GetChildNodes()         _XML_GetChildren()             _XML_NodeExist()
.        _XML_RemoveAttribute()         _XML_GetChildText()         _XML_UpdateField()
.        _XMLGetField()
. Renamed: Function: __XML_IsValidObject >> __XML_IsValidObject_DOMDocument - mLipok
. COMPLETED: Function: _XML_SaveToFile - mLipok
. Removed: $XMLWRAPPER_ERROR_NODECREATEAPPEND - mLipok
. ADDED: $XMLWRAPPER_ERROR_NODECREATE - mLipok
. ADDED: $XMLWRAPPER_ERROR_NODEAPPEND - mLipok
. Changed: Functions to proper use $XMLWRAPPER_ERROR_NODECREATE  and $XMLWRAPPER_ERROR_NODEAPPEND - mLipok
. Renamed: Function: __XML_IsValidObject_Nodes >> __XML_IsValidObject_NodesColl - mLipok
. Renamed: ENUMs: $XMLWRAPPER_EXT_OK >> $XMLWRAPPER_EXT_DEFAULT - mLipok
. Renamed: Function: _XML_GetNodeCount >> _XML_GetNodesCount - mLipok
. Renamed: Function: _XML_GetAttrib >> _XML_GetNodeAttributeValue - mLipok
. Changed: Function: _XML_GetNodeAttributeValue - parameters chagned - must pass $oNode instead $oXmlDoc - mLipok
. COMPLETED: Function: _XML_LoadXML - mLipok
. COMPLETED: Function: _XML_CreateDOMDocument - mLipok
. COMPLETED: Function: _XML_Tidy - mLipok
. Renamed: Function: _XML_CreateObject >> _XML_CreateDOMDocument - mLipok
. NEW: Region: XMLWrapperEx.au3 - Functions - Not yet reviewed - mLipok
. NEW: Region: XMLWrapperEx.au3 - Functions - COMPLETED - mLipok
. COMPLETED: Function: _XML_GetNodeAttributeValue - mLipok
. other CleanUp - mLipok

 

Download link. 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

Recently I make this:

  Quote

. REFACTORED: all this following function uses _XML_SelectNodes() - mLipok
.        _XMLCreateChildNode()         _XML_DeleteNode()             _XML_GetAllAttribIndex()
.        _XML_GetParentNodeName()     _XMLSetAttrib()             _XML_UpdateField2()
.        _XMLGetValue()                 _XML_GetNodesCount()         _XML_ReplaceChild()
.        _XML_GetNodesPath()            _XMLGetAllAttrib()
. REFACTORED: all this following function uses _XML_SelectSingleNode() - mLipok
.        _XML_CreateAttribute()         _XML_CreateComment()         _XML_GetAttrib()
.        _XML_GetChildNodes()         _XML_GetChildren()             _XML_NodeExist()
.        _XML_RemoveAttribute()         _XML_GetChildText()         _XML_UpdateField()
.        _XMLGetField()

I have an idea.
I'm thinking on changing concept that this function should have as parameter $oNodesColl or $oNode instead $sXPath.
In that case _XML_SelectSingleNode() and _XML_SelectNodes(),
should be thrown out these functions.

So I want to ask: what you mean about this concept ?

 

Edited by mLipok
wording

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

I think  __XML_ComErrorHandler_UserFunction
Should not be internal.

User should be able to setup his own Function for COMErrorHandler for each separate UDF just after #include section, and do not worying about this in any other place.

for example 

In a future  I would like to use this kind of code:

#include "xml.au3"
#include "XZIP.au3"
#include "SQL.au3"
#include "DEBENU.au3"
#include "CHILLKAT.au3"
#include "PDFCREATOR.au3"


; This error hanlder will be used globally excepting inside UDF Functions
; unles you set it up for UDF with _UDFNAME_ComErrorHandler_UserFunction
Global $oErrorHandler = ObjEvent("AutoIt.Error", ErrFunc_CustomUserHandler_MAIN)
#forceref $oErrorHandler


_XML_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler_XML)
_XZIP_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler_XZIP)
_SQL_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler_SQL)
_DEBENU_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler_DEBENU)
_CHILLKAT_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler_CHILLKAT)
_PDFCREATOR_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler_PDFCREATOR)


_Main()
Func _Main()
    ; user script start here
    ; .......
    ; .......
    ; .......
EndFunc

 

Of course, the user can define one function for all UDF as follows:

#include "xml.au3"
#include "XZIP.au3"
#include "SQL.au3"
#include "DEBENU.au3"
#include "CHILLKAT.au3"
#include "PDFCREATOR.au3"


; This error hanlder will be used globally excepting inside UDF Functions
; unles you set it up for UDF with _UDFNAME_ComErrorHandler_UserFunction
Global $oErrorHandler = ObjEvent("AutoIt.Error", ErrFunc_CustomUserHandler_MAIN)
#forceref $oErrorHandler


_XML_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler)
_XZIP_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler)
_SQL_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler)
_DEBENU_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler)
_CHILLKAT_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler)
_PDFCREATOR_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler)


_Main()
Func _Main()
    ; user script start here
    ; .......
    ; .......
    ; .......
EndFunc

 

 


These questions are important from the point of view of further action on the UDF but also for others.
I would just about handling errors by COMErrorHandler finish and move on.

Therefore, the request for an opinion what do you think in general about the way that has been presented here by me.

 

mLipok

 

EDIT: By the way, manner discussed here, will be used also in modifications for ie.au3 (I will publish soon Beta version)

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

I just want to say that I have tremendous respect for mLipok for taking on this tremendous task, and the rate of updates is staggering and encouraging. Also, thanks to all those like guinness and anyone else who works on these UDF's out of ... whatever motivation they may have. 

I think this and the recent OO_JSON.au3 do make sense for future inclusion as native libraries... but I don't know how that process works. 

 

  • 4 weeks later...
Posted

I'am using Autoit lastest version 3.3.12 - 14.0 . This Script is not working . It's too much error :

 

- ERROR OPEN FILE WITH BOM

- $OBJ_NAME is not declare

- With statement is invalid

Posted

Which SciTE version you are using ?

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 10/20/2015 at 10:09 AM, mLipok said:

Which SciTE version you are using ?

Version 3.4.4 
    Jul 13 2014 20:07:38

I'am very want your script may be best working ! Please help me to do use !

Posted (edited)

https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe

Try to update

 

EDIT:

  On 10/20/2015 at 8:34 AM, scila1996 said:

- $OBJ_NAME is not declare

$OBJ_NAME is defined in 

#include <AutoItConstants.au3>

Which is included by at top of XMLWrapperEx.au3 UDF.

 

  On 10/20/2015 at 8:34 AM, scila1996 said:

- With statement is invalid

Show me SciTE console output.

 

Edited by mLipok
wording

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Thank you ! I was runned this script, may be it's have so much Features more than XMLWRAPERE . If can you do the few Example for each function ?

 

Thank you !

Posted
  On 10/21/2015 at 1:27 AM, scila1996 said:

If can you do the few Example for each function ?

I have such a plan. But now I'm working on other AutoIt project.

For now you should check XMLWrapperEx__Examples.au3
You can find there few examples.

 

btw.
Remember
!!!!!!!!! This is BETA VERSION (all could be changed) !!!!!!!!!

Generaly function in:

#Region XMLWrapperEx.au3 - Functions - Work in progress
; .......
#EndRegion

#Region XMLWrapperEx.au3 - Functions - Not yet reviewed
; .......
#EndRegion

are Work In Progress so you must have it in mind that this function can change entirely.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Did you check @error and @extended ?

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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...