Jump to content

There's nothing here yet

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By rudi
      once more I have to see, that my knowledge about XML is too poor, even to use this existing XML UDF
      If it should be a better approach to make use of StringRegEx, or maybe a totally different approach, any suggestions will be mostly appreciated.
      I downloaded the ZIP XML_1.1.1.13 and tried to get how to use it from the sample AU3 files included in that ZIP file, well, I don't really get it😵
      What I want to do:
      My mobile phone's backup contain all the contacts in an XML file. This is an example of such a file, backupinfo.xml, shortened to show just one fictive entry:
      <?xml version="1.0" encoding="utf-8" ?> <ContactRecords> <contact> <structuredName> <displayName>Max Mustermann</displayName> <givenName>Max</givenName> <familyName>Mustermann</familyName> <prefixName /> <middleName /> <suffixName /> <phoneticGivenName /> <phoneticMiddleName /> <phoneticFamily /> </structuredName> <organization> <company>Schlosserei Mustermann GmbH</company> <department /> <title /> </organization> <phones> <phone> <number>07652 881 8181</number> <type>home</type> <customLabel /> </phone> <phone> <number>0 800 435 2758</number> <type>work</type> <customLabel /> </phone> <phone> <number>+49 160 4321 222</number> <type>mobile</type> <customLabel /> </phone> </phones> <emails /> <addresses /> <ims /> <WebSites /> <Events /> <note /> <nickName /> <photo /> <netPhone /> <groups> <group> <groupName>Ungrouped</groupName> </group> </groups> </contact> </ContactRecords>  
      Basically I want to search my mobile's contacts for phone numbers to, to see, what contact they belong to. Propably it will make the task much more easy, when standardizing the mobile's contact XML to hold all numbers in "international-notation-without-any-whitespaces" (thats no problem):
      <?xml version="1.0" encoding="utf-8" ?> <ContactRecords> <contact> <structuredName> <displayName>Max Mustermann</displayName> <givenName>Max</givenName> <familyName>Mustermann</familyName> <prefixName /> <middleName /> <suffixName /> <phoneticGivenName /> <phoneticMiddleName /> <phoneticFamily /> </structuredName> <organization> <company>Schlosserei Mustermann GmbH</company> <department /> <title /> </organization> <phones> <phone> <number>+4976528818181</number> <type>home</type> <customLabel /> </phone> <phone> <number>+498004352758</number> <type>work</type> <customLabel /> </phone> <phone> <number>+491604321222</number> <type>mobile</type> <customLabel /> </phone> </phones> <emails /> <addresses /> <ims /> <WebSites /> <Events /> <note /> <nickName /> <photo /> <netPhone /> <groups> <group> <groupName>Ungrouped</groupName> </group> </groups> </contact> </ContactRecords>  
      What I would like to get from the XML file as a result, e.g. searching the phone number "+491604321222"
      Present in XML  or not (true) if present then return the values for... type (mobile) givenname (Max) familyname (Mustermann) company (Schlosserei Mustermann GmbH) optional: Other node names and their values within that contact, when not "empty" (like in this examle <emails /> or <middlename />)  
      The values from #2 - #6 would be perfect when returned in a 2D Array, Col0 = name, Col1 = value.
      Regards, Rudi.
    • By Danp2
      Hi all,
      I'm reading the file https://msedgedriver.azureedge.net/LATEST_RELEASE_83 using WinHTTP, and the string I get back looks like this when I view this file in Scite --
      xEFxBFxBF83.0.478.54 Here's what I've come up with as a means to strip off the Unicode BOM from the beginning of the string --
      If Asc($sDriverLatest) = 255 Then ConsoleWrite("Unicode detected!" & @CRLF) $sDriverLatest = BinaryToString($sDriverLatest, $SB_UTF16LE) If Asc($sDriverLatest) = 63 Then $sDriverLatest = StringMid($sDriverLatest,2) ; skip ? EndIf ConsoleWrite("Latest=" & $sDriverLatest & @CRLF) Is there a more reliable way to eliminate these unicode characters?
    • By MarkIT
      Hi AutoIT Masters,
      Sorry again but Just want to know if you have any idea why the AutoIT scripts converted into 32-bit.exe files are being deleted by AV but not 64-bit.exe. If we raise it to the AV whitelisting, they come back saying it is false positive.
      I disabled AV and everything goes well.
      OS: Windows 10 - 64 bit
      AV: Symantec
      Thanks for the help.

    • By VinMe
      Dear all, i am unable to open a xml file to excel in the "xml table format" Please help me out in where i am missing
      Local $strFileToOpen = _WinAPI_OpenFileDlg('Select xml file', @WorkingDir, 'All Files(*.*)', 1, '', '', BitOR($OFN_PATHMUSTEXIST, $OFN_FILEMUSTEXIST, $OFN_HIDEREADONLY)) Global $xlXmlLoadImportToList = 2 ; Places the contents of the XML data file in an XML table $oExcel = _Excel_Open() $oWorkbook1=$oExcel.Workbooks.OpenXML($strFileToOpen, "", $xlXmlLoadImportToList) If $strFileToOpen <> False Then     Local $oWorkbook1 = _Excel_BookOpen($oExcel, $strFileToOpen) EndIf Error i am getting is:
      ......\81e_Compare_v1.au3" (46) : ==> The requested action with this object has failed.:
      $oWorkbook1=$oExcel.Workbooks.OpenXML($strFileToOpen, "", $xlXmlLoadImportToList)
      $oWorkbook1=$oExcel.Workbooks^ ERROR
      >Exit code: 1    Time: 7.338
    • By GillesMaisonneuve
      Good morning,
      I am trying to read a Unicode utf8 string from a perl subprocess via StdoutRead.
      I use an AUtoIt GUI and display result in an 'Edit' control (see my code below) using 'Courier New', a font that can handle Unicode characters.
      I was expecting a result looking like (CMD console):
      ++$ chcp 65001>NUL: & perl -Mutf8 -CS -e "use 5.018; binmode STDOUT,q(:utf8); say qq(\x{03A9})" & chcp 850>NUL: Ω Instead I get someting like this (see downward the screen copy):
      ++$ chcp 1250>NUL: & perl -Mutf8 -CS -e "use 5.018; binmode STDOUT,q(:utf8); say qq(\x{03A9})" & chcp 850>NUL: Ω Obviously while I was expecting to receive an utf8 char, it seems to have been converted to Windows ANSI codepage 1250 (Windows default for Western/Central Europe, right ?)
      What am I doing wrong? Is there someone who could guide me?
      Here is my code and my output in the GUI.
      Creating and configuring the Edit control:
      Local $Edit1 = GUICtrlCreateEdit( "", 20, 110, 780, 500, BitOr($GUI_SS_DEFAULT_EDIT,$ES_MULTILINE,$ES_READONLY) ) GUICtrlSetData($Edit1, "This field will contain text result from external Perl command") GUICtrlSetFont($Edit1, 10, $FW_THIN, $GUI_FONTNORMAL, "Courier New")  
      Executing Perl command (note: `-Mutf8` and `-CS` garantees that I work in utf8 and STDOUT accepts wide-characters):
      local $ExePath = 'perl.exe -Mutf8 -CS ' ;~ if perl in PATH, no need for full path C:\Perl\bin\perl.exe local $Params = '-e "use 5.018; use utf8; use charnames q(:full); binmode STDOUT,q(:utf8);' & _ 'say scalar localtime; say qq(\N{GREEK CAPITAL LETTER OMEGA})"' local $Cmd = $ExePath & ' ' & $Params Local $iPID = Run($Cmd, "", @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD))  
      Reading STDOUT and displaying it into the Edit control:
      While 1 $sOutput &= StdoutRead($iPID) If @error Then ; Exit the loop if the process closes or StdoutRead returns an error. ExitLoop EndIf WEnd If $sOutput <> '' Then GUICtrlSetData($Edit1, $sOutput) EndIf  
      And now, what I get on my GUI:

  • Create New...