Login Register






[AutoIt]Another function to read XML elements filter_list
Author
Message
[AutoIt]Another function to read XML elements #1
include:
Code:
#include <String.au3>


Function:
Code:
Func CompReadXML($Path, $Value) ;By 1234hotma0ster Local $aRet = _StringBetween(FileRead($Path), '<' & $Value & '>', '</' & $Value & '>') If IsArray($aRet) Then Return $aRet Else Return SetError(-1) EndIf EndFunc ;==>CompReadXML


Coded by me Biggrin
The other one is a bit buggy because i didn't make it so i thought i make my own Smile
(This post was last modified: 11-30-2011, 07:13 AM by Skullmeat.)
Pierce the life fibers with your drill.

Reply

RE: [AutoIt]Another function to read XML elements #2
$Path wasn't declared in the function, how was it used? If you called this function in another function would you have to name the FileOpen() var $Path? I don't really know about user made functions.

Reply

RE: [AutoIt]Another function to read XML elements #3
function parameters don't need to be declared Smile

and if you only want to read a text of a file you can use fileread directly but if you wanna read binary and stuff you need fileopen Smile
Pierce the life fibers with your drill.

Reply

RE: [AutoIt]Another function to read XML elements #4
So if I made a function I could call variables whatever I want? And do I have to put them with the function name like you did in

Code:
CompReadXML($Path, $Value)

(12-02-2011, 10:59 PM)[ntdll.dll]x[advapi32.dll] Wrote: function parameters don't need to be declared Smile

and if you only want to read a text of a file you can use fileread directly but if you wanna read binary and stuff you need fileopen Smile

Ok. I knew that. XD
(This post was last modified: 12-02-2011, 11:28 PM by doojan.)

Reply

RE: [AutoIt]Another function to read XML elements #5
Um... No you need to declare the ones in which you want to use to Call the function itself.
Pierce the life fibers with your drill.

Reply

RE: [AutoIt]Another function to read XML elements #6
Ok Thanks. Everything Helped. Smile

Reply