Jump to content

Hiyoal

Active Members
  • Posts

    52
  • Joined

  • Last visited

Everything posted by Hiyoal

  1. Haha makes sense. As soon as I wrote my post I started tinkering away with checking nodeNames individually without going through _XML_Array_GetNodesProperties and saw all of those #text entries.
  2. Champion. Thats working now for the example and my own script. I saw the changes. The addition to validate the object made sense but I didn't understand the removal of the "#text" ContinueLoop in that for loop. Im stoked I wasn't going bonkers, thanks for the help TheXman.
  3. For sure. My code I used (In case I missed something drastic 😮 Func Example_6__XML_GetChildNodes() ; first you must create $oXmlDoc object Local $oXMLDoc = _XML_CreateDOMDocument(Default) ; Load file to $oXmlDoc Local $sXmlFile = @ScriptDir & "\XML_Example_XML_Files\MSDN\books.xml" _XML_Load($oXMLDoc, $sXmlFile) ; simple display $oXmlDoc - for checking only MsgBox($MB_SYSTEMMODAL + $MB_ICONINFORMATION, 'Example_6__XML_GetChildNodes', _XML_TIDY($oXMLDoc)) ; selecting nodes Local $oNodesColl = _XML_GetChildNodes($oXMLDoc, "//book") If @error Then Return SetError(@error, @extended) ConsoleWrite(StringFormat("$oNodesColl is a vartype of %s", VarGetType($oNodesColl)) & @CRLF) ConsoleWrite(StringFormat("$oNodesColl.length = %s", $oNodesColl.length) & @CRLF) ConsoleWrite(StringFormat("ObjName($oNodesColl) = %s", ObjName($oNodesColl, 1)) & @CRLF) ; change Nodes Collection to array Local $aNodesColl = _XML_Array_GetNodesProperties($oNodesColl) If @error Then MsgBox($MB_SYSTEMMODAL + $MB_ICONINFORMATION, 'ERR:' & @error & ' EXT:' & @extended, XML_My_ErrorParser(@error, @extended)) EndIf _ArrayDisplay($aNodesColl, 'Example_6__XML_GetChildNodes: ' & 'Length=' & $oNodesColl.length) EndFunc ;==>Example_6__XML_GetChildNodes Console Output: $oNodesColl is a vartype of Object $oNodesColl.length = 13 ObjName($oNodesColl) = IXMLDOMNodeList Different length than yours but the object is of the same type?? I am still getting that screenshot error too (I know consolewrite's wouldn't be fixing that and it was for debug purposes):
  4. Yeah gotcha. I was tinkering yesterday and came to this conclusion. I've been having trouble with the getchildnodes function as its throwing weird errors. Ive asked the udf support thread about this so Ill see how I go.
  5. TheXman Thanks for the first bit. I did try without both Length and Expr in testing but put it back to normal when writing up this post. As for the other error, I haven't moved the XML_Example.au3 anywhere. Freshly unzipped with books.xml displaying its contents from the first msgbox. Func Example_6__XML_GetChildNodes() ; first you must create $oXmlDoc object Local $oXMLDoc = _XML_CreateDOMDocument(Default) ; Load file to $oXmlDoc Local $sXmlFile = @ScriptDir & "\XML_Example_XML_Files\MSDN\books.xml" _XML_Load($oXMLDoc, $sXmlFile) ; simple display $oXmlDoc - for checking only MsgBox($MB_SYSTEMMODAL + $MB_ICONINFORMATION, 'Example_6__XML_GetChildNodes', _XML_TIDY($oXMLDoc)) ; selecting nodes Local $oNodesColl = _XML_GetChildNodes($oXMLDoc, "//book") ; change Nodes Collection to array Local $aNodesColl = _XML_Array_GetNodesProperties($oNodesColl) If @error Then MsgBox($MB_SYSTEMMODAL + $MB_ICONINFORMATION, 'ERR:' & @error & ' EXT:' & @extended, XML_My_ErrorParser(@error, @extended)) EndIf _ArrayDisplay($aNodesColl, 'Example_6__XML_GetChildNodes: ' & 'Length=' & $oNodesColl.length) EndFunc ;==>Example_6__XML_GetChildNodes MsgBox($MB_SYSTEMMODAL + $MB_ICONINFORMATION, 'Example_6__XML_GetChildNodes', _XML_TIDY($oXMLDoc)) displays the contents of the XML loaded (books.xml), $oNodesColl gets returned as being successful in that it is an object, not null etc...and then _XML_Array_GetNodesProperties() throws that screenshot error I posted in my last post. I tried downloading this on 2 other fresh PCs and I had the same result. I'm just stumped at this point...especially since you didn't get the error when running the script and its throwing the same error when I try and use _GetChildNodes() in my own script reading my own XML which I verified has loaded to $oXMLDoc 😮 Sorry about this
  6. I have been having a bit of trouble the last couple of days with getChildNodes and just noticed now that I am also having the same problem using the supplied: XML_1.1.1.13\XML__Examples.au3 Example 6 throws the following: When I use: ; change Nodes Collection to array Local $aNodesColl = _XML_Array_GetNodesProperties($oNodesColl) If @error Then MsgBox($MB_SYSTEMMODAL + $MB_ICONINFORMATION, 'ERR:' & @error & ' EXT:' & @extended, XML_My_ErrorParser(@error, @extended)) EndIf from line 272 to give me an error I get this: Am I doing something wrong? This is the same when I use my own XML or any other XML file. Thanks
  7. Hi there, I have recently been trying to traverse the attached ASP-1.HVAC_Main.xml to try and replicate and write the folder structure contained to another XML. I have been trying to use: But have been having a lot of trouble with actually understanding the XML structure in accomplishing my task. What I am trying to do is traverse down //ObjectSet/ExportedObjects, picking out OI elements and checking to see whether their attribute TYPE="system.base.Folder". If it is then I want to be able to go down into that "Folder" and check to see whether there are any OI attributes with TYPE="trend.TLog" or TYPE="trend.TLogChangeOfValue". If not then look for another folder. If there are no other folders then back up to the folder before this folder and check the next folder (if applicable) and repeat. So it would do something like this: If there is that type then I want to be able to record that "Path" down to that Trend Log and save it into an XML with just the folders and not the items inside. In the end I want to accomplish something that is reminiscent of my other attached file, ExtendedTrendLogs.xml. From what I can tell from the xml UDF functions, I can only get ALL elements of a certain type instead of checking and delving further into the "next" OI element nested within the first OI element which is of TYPE="system.base.Folder". Any help is appreciated!!! Thanks! ASP-1.HVAC_Main.xml ExtendedTrendLogs.xml
  8. Just one quick tip. You can store Hex values to variables directly without using Hex() $HP=0xAddress $Mana=0xAddress Global $Offset_HP = Hex( 9931024, 7 ) Global $Offset_MP = Hex( 9931024, 7 ) Can be expressed as: Global $Offset_HP = 0x0978910 Your Mana address would look like this according to your instructions: Global $Offset_MP = ($Offset_HP+2*(0x598)+0x2d4) Final code for Addresses: Global $Offset_HP = 0x0978910 Global $Offset_MP = ($Offset_HP+2*(0x598)+0x2d4) Remember, you can always check to see what the addresses will be by using Windows Calculator. Change it to Programmer if you are using windows 7, or just use scienftific if you are on XP. Select Hex as your variable type and just type in your addresses. As simply as: 978910+598+598+2d4 It will spit out the value: 979714 which is your Mana Address. Now stick a 0x0 before it and you have your address in hex. Hope that helped, Hiyoal
  9. Try using: While 1;While "Forever" do the following Send("{H}");presses Ctrl+h Sleep(1000);pauses the script for 1 second Wend;End of loop, go back to the start While. Hiyoal
  10. Exactly what tharris has pointed out. You need to compare the ip addresses to 10.10 & ".*.*". If the first one isnt the ip address then try the second, and if the second isnt the one then try the third and so on. Hiyoal
  11. Cheat Engine. Yea. Try it in cheatengine with that address and see how long the char[] is, because that script should work. Also, are you from elitepvpers or gzp?? Hiyoal
  12. What UDF are you using?? Hiyoal
  13. No problem Anytime
  14. #include <file.au3> $File="Path to file" $lines=_FileCountLines($File) $fileopen=FileOpen($File) $linenumber=Random(1,$lines,1) $stringread=FileReadLine($fileopen,$linenumber) FileClose($fileopen) msgbox(0,"Random Word", "Random word from list is: "&$stringread) Hope you like it Hiyoal
  15. Just reset all variables and make a "Starting function" from where your script starts. Then just call that function, and you have started again. Hiyoal
  16. Why are you using FileClose?! You arent using FileOpen so you should use something like _XMLSaveDoc and/or _XMLTransform. Hiyoal
  17. StringTrimLeft(). What you would basically do is do this: $file="C:\charfile.txt" $handle=FileOpen($file,0) ;read only $readhandle=FileRead($handle) ;reads the whole text file $newstring=StringTrimLeft($readhandle,4) ;removes the first 4 characters FileWrite("C:\charfileappended.txt",$newstring) FileClose($handle) Hiyoal
  18. I wrote these 2 guides on ElitePvPers.de/forum Part 1: http://www.elitepvpers.de/forum/co2-guides...cros-part1.html Part 2: http://www.elitepvpers.de/forum/co2-guides...s-part-2-a.html Hope they are satisfactory for beginner learners. Hiyoal
  19. _GUICtrlIpAddress_Create
  20. Oooo. Your saying you have the Wow Mem Reading ap...Well I dont know anything about that XD Sorry.
  21. Cheat Engine is your best friend with memory hacking.
  22. Why not make a splash screen with the picture?!
  23. TySm...This is FANTASTIC!!!
  24. I would just read the file and use a _StringReverse conversion to see the directed output. Hiyoal
×
×
  • Create New...