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!
I am wanting to know what my CPU temp is but don't know what object to use. I don't relay know how objget works so would not know where to start. I have seen people integrate things like windows speech to text into their scripts but don't know how they know what object to use! How do I find the right object? And how dose it work?
How to work easily and fast with the oleview.exe which Displays the Object COM from Windows and other programs~
I'm trying to create a remote object using the example script on the ObjCreate function reference page:
#include <MsgBoxConstants.au3> ;Open the MediaPlayer ona REMOTE computer Local $oRemoteMedia = ObjCreate("WMPlayer.OCX", "W2RATD5NGK32", "W2RATD5NGK32\administrator", "Win7Pilot") If Not @error Then MsgBox($MB_SYSTEMMODAL, "Remote ObjCreate Test", "ObjCreate() of a remote Mediaplayer Object successful !") $oRemoteMedia.openPlayer(@WindowsDir & "\media\tada.wav") ; Play sound if file is present Else MsgBox($MB_SYSTEMMODAL, "Remote ObjCreate Test", "Failed to open remote Object. Error code: " & Hex(@error, 8)) EndIf The message returns: Failed to open remote Object. Error Code: 80004002
I've tried researching this error but haven't found any useful info. All I know are these requirements below and I know for sure that the services are running, and the script is being executed as x64 with admin rights.
I'm now at a dead end and not sure how to further troubleshoot this error. Also, the script runs fine when I use my own hostname. Any ideas?