I've recently be kinda forced into trying to learn OOP within AutoIt. I'm trying to convert XML into objects I guess instead of trying to parse it into arrays within arrays. An example is below:
<User> <roles> <role>Agent</role> <role>Supervisor</role> </roles> </user>
How can I convert this? Would <roles> be $User.Roles? If so would the children be $User.Roles.Role.Agent and $User.Roles.Role.Supervisor? If not, how do I reference each Object?
Any assistance would be appreciated. I tried to understand XML.au3 but I'm so confused trying to wrap my head around this.
My work has recently switched from a Win32 based application to a web based application. Thankfully there's an API for me to attach to now but I have a few questions since I'm using Objects now for some parts of my scripts...
Do I need to run ObjCreate("winhttp.winhttprequest.5.1") everytime before any object stuff or can I just run it once at the beginning of my script and reuse it? Is $oHTTP.Open("GET", <url>) followed by $oHTTP.Send() pretty much the same as INetRead and can I use them interchangeably? Do I need to somehow delete the Object after creating it at the end of my script? - Answered by Helpfile Thanks!
Good evening everyone
I'm working on a little project of mines, and I was trying to use WMI Object.
The question which I don't find an answer is:
Once I do the query with WMI Object, something like "SELECT * FROM Win32_LogonSession", instead of specify the field of the collection returned, ( i.e. $colItems.Caption ), can I loop though each property and each value of the property, writing so one row of code only?
Hope my question was clear enough.
Thanks in advance.
; NetFirewallPolicy2 COM UDF Library for AutoIt3
; AutoIt Version : 18.104.22.168
; Description ...: Windows Firewall Policy2 Interface, Provides access to the firewall policy for Windows Vista+
Including Test Script
ITypeInfo to extract information about the characteristics and capabilities of objects from type librariesBy Bilgus
I was Playing around With AutoIt this evening and wondered how hard it would be to get typeinfo like the COM Viewers do only using AutoIt
Turns out it was pretty easy.
A Few Notes:
CAarray info is unfinished I didn't have any objects to test it on so I left it Limited.
The Object must have IDispatch exposed (ITypeInfo is derivative)
Its Just a proof of concept Run with it but don't carry scissors