
AutoitMike
Active Members-
Posts
194 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by AutoitMike
-
Is there a way that a user can select provided values in a combo box but not be able to manually type anything into the box?? EG: There will be numbers from 1 to 4 where numbers outside of that range is not valid. Thanks in advance
-
Get Count Of Child Nodes That Have Same Name
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
It works great! Thanks very -very-very much -
Get Count Of Child Nodes That Have Same Name
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
Thanks very much. I will try this later tonight. -
Get Count Of Child Nodes That Have Same Name
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
-
Get Count Of Child Nodes That Have Same Name
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
What is the value for .length? -
I am working with an XML file that has parents with multiple children with the exact same name. Each child is selected by the following: SelectSingleNode “/Parent/abc [n]” Where n is the child number. SelectSingleNode “/Parent/abc [0]” would select the first occurance of “/Parent/abc” I just need to know how many of these child nodes, “abc” exist. I dont need this number to simply get to the last node, i dont even need the value there, I just need to know how many of the child nodes exist. There will sometimes be other child nodes with different names under the same parent. Thanks in advance.
-
XML Copy child node and append to parent
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
NINE, The word TRUE has to be in quotes!! $oNewNode = $oNodeChild.cloneNode('True') OYE! -
XML Copy child node and append to parent
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
I have attached the test file I am using. I thought that just a snippet of the file would work. Maybe thats the problem. Curious to see if you have the same issue. Thanks CloneRPT.hr4 -
XML Copy child node and append to parent
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
Nine, The child node /genInfo got copied and added to //template, but none of its child nodes or its sibilings got copied / cloned. I thought that the "True" statement was supposed to do this. -
I am attempting to copy a child node and all its children below a parent node and append the copy to the same parent. The method to select either of the two child node would then be "SelectSingleNode//Parent/Child [0]" for the first child [1] for the second child. I know that node last and node fist would work here but I plan to create many child nodes once I learn this step. Example I am attempting to change this: <template version="5"> <genInfo> <GA> <GASM> <GASMT>Text</GASMT> </GASM> <GASM/> </GA> </genInfo> </template> Into this: <template version="5"> <genInfo> <GA> <GASM> <GASMT>Text</GASMT> </GASM> <GASM/> </GA> </genInfo> <genInfo> <GA> <GASM> <GASMT>Text</GASMT> </GASM> <GASM/> </GA> </genInfo> </template> The following code produces no error but does nothing: Local $oXML = ObjCreate("Microsoft.XMLDOM") ;For all XML fie operations $oXML.load("C:\Utilities\Temp\CloneRPT.hr4") $oNodeChild = $oXML.SelectSingleNode('//template/genInfo') $oNodeParemt = $oXML.SelectSingleNode('//template') $oNodeParemt.appendchild($oNodeChild) $oXML.Save("C:\Utilities\Temp\CloneRPT.hr4") Thanks
-
How to create Node "prop name='xxx' type="0"
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
junkew, Then the node specification "prop[@name='element name'] " is how to reference a node that has an attribute/s. whereas "//Root/node name" is how you reference a node that has no attributes??? -
How to create Node "prop name='xxx' type="0"
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
Thanks for the link. The documentation is quite overwhelming. Why would an application use this screwy method of defining node names? //ABC/MyNode works pretty well. Is there a specific advantage for “prop name”=“Abc” type=“0” ?? -
How to create Node "prop name='xxx' type="0"
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
Where is the documentation for these XML functions? Thanks -
How to create Node "prop name='xxx' type="0"
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
I made a change to protect actual data and goofed. Your example works, You rock. Thanks ever so much, -
How to create Node "prop name='xxx' type="0"
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
Nine, I am attempting to add the last two nodes in this sample file. Thanks reportxx.hr5 -
How to create Node "prop name='xxx' type="0"
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
Nine, Can I send you a sample file? -
How to create Node "prop name='xxx' type="0"
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
Nine, I have tried your first line in a few different ways, still fails with the line that appends the new node. -
How to create Node "prop name='xxx' type="0"
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
Nine, I get an error "The requested action with this object has failed." on the line that attempts to appendChild(New) I changed the first line to: Local $oNode = $oXML.SelectSingleNode("//ClientList") This is the parent node Thanks -
How to create Node "prop name='xxx' type="0"
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
Thanks Nine, I may have miss led you on one item. The parent node is plain, EG: "//ClientList" Then, I need to add the child "Prop name='xxx' type="0" Thanks again -
I am trying to create and append a node that reads like the following: prop name="xxx" type="0" This is what it looks like when using XML viewer. When using notepad (to just view it) it looks like this: <prop name="xxx" type="0">xxx value</prop> For nodes with ordinary names, I have no problem adding nodes, EG: $oOther = $oXML.SelectSingleNode('//xCity') $Node=$oXML.CreateElement('ABC') $oOther.AppendChild($Node) The above works fine. In another program I have no problem reading , selecting and setting these types of nodes, EG: $oOther = $oXML.SelectSingleNode("//xInfo/prop[@name='zzz']") MsgBox(0,"",$oOther.text) $oOther.text="123" Thanks for any help
-
Need to check if file is ready to open.
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
I am not sure what the process name is. I am using the following code to open the file in question: Local $oXML = ObjCreate("Microsoft.XMLDOM") $oXML.load($ReportFile) ;just some of the code here: ;add node year built and update it $oOther = $oXML.SelectSingleNode('//template/genInfo/GA/SM[1]') $Node=$oXML.CreateElement('SMT') $oOther.AppendChild($Node) $oOther = $oXML.SelectSingleNode('//template/genInfo/GA/SM[1]/SMT') $oOther.text=$YearBuilt $oxml.save($ReportFile) ;Now, I got to run an exe that starts up and opens this file. But what is the name of the process that would have $ReportFile open? -
Need to check if file is ready to open.
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
My installation does not have WinAPIFiles.au3, but I do have WinAPI.au3 I dont have WinAIObj.au3 My version has the extensive MS Word interface and functionality for which I am fully taking advantage of. -
Need to check if file is ready to open.
AutoitMike replied to AutoitMike's topic in AutoIt General Help and Support
I dont know what IPC signal is. My process only runs one time. -
Need to check if file is ready to open.
AutoitMike posted a topic in AutoIt General Help and Support
A process of mine opens a HML file, modifies it and then saves, closes it. I then need to run an.exe that opens this file right after this.. However, nothing that I find on this forum works that supposedly tests to see if the fie is still open, ready to be used by another process. Right now, I just Sleep(2000) . I would like something cleaner than this. This function, for example, returns False when nothing has it opened or if I open the file with notepad or any other editor. I am running on a win7 laptop, if that has any bearing. $File="C:\Utilities\test\report.hr5" MsgBox(0,"", _FileInUse($File)) Exit Func _FileInUse($sFilePath) ; By Nessie. Modified by guinness. Local Const $hFileOpen = _WinAPI_CreateFile($sFilePath, $CREATE_ALWAYS, $FILE_SHARE_WRITE) If $hFileOpen Then _WinAPI_CloseHandle($hFileOpen) Return False EndIf Local $fReturn = False If _WinAPI_GetLastError() = 32 Then $fReturn = True Return $fReturn EndFunc