Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/03/2019 in all areas

  1. Malkey

    RegExp Help ^_^

    @caramen In your above post starting with "Look i put all possible cases in one script ....", try replacing the RE pattern, $cPattern in the example with :- $cPattern = "(?is)\[([^\]]+)\]\[((?1))\]\[((?1))\]\[((?1))\]\[?([^\]]*)\]?.*?Bonjour,\s*(.+)\hvous.+email\h:\h([^""]+).+tél\.\h:\h([^""]*)"
    1 point
  2. Have a look at XML.au3 by @mLipok, the function XML_Tidy does what you want, however I tried with your xml file but I can't parse the file, I couldn't parse it with XML Notepad either, I tried adding the namespace but it said it's invalid. Unfortunately I've got to get some shuteye, work in three hours But maybe you or some else can figure out the correct schema, if not I'll look at it again after work.
    1 point
  3. $iColumnCount = $oWorkBook.Activesheet.Range("B4").CurrentRegion.Columns.Count Example for Cell "B4".
    1 point
  4. FrancescoDiMuro

    RegExp Help ^_^

    @caramen Now you can experiment whatever you want #include <Array.au3> #include <StringConstants.au3> Global $strString = "[XXXXX][Autre][60][Demandeur][4567_987654]SomeText" & @CRLF & @CRLF & _ "Bonjour," & @CRLF & _ "Charles HENRY vous envoie un message." & @CRLF & _ "J'ai un problème de toilette" & @CRLF & _ "Merci de m'aider" & @CRLF & _ "- email : Jordane.AutoIT@AutoITForum.com" & @CRLF & _ "- tél. : 0607080909" Global $strPattern = "(?is)" & _ "\[([a-z]{5})\]" & _ ; Five Letters "\[(PO|Autre|[^]]+)\]" & _ ; PO or Autre or whatever you want "\[(\d{1,3})\]" & _ ; Three Digits "\[(Demandeur|Opérateur|Prise|Instructeur)\]" & _ ; One of five Strings "(?:\[(\w+)\])?" & _ ; Folder Number, which is OPTIONAL ".*?" & _ "Bonjour,\s" & _ "(.*?)vous.*?" & _ ; Name and Surname "\-\semail\s:\s([^\n]+)\s" & _ ; Email "\-\stél\.\s:\s([-\d]+)?" ; Telephone number, which is OPTIONAL Global $arrResult $arrResult = StringRegExp($strString, $strPattern, $STR_REGEXPARRAYGLOBALMATCH) If IsArray($arrResult) Then _ArrayDisplay($arrResult)
    1 point
  5. The "[" and "]" do not belong to the function. It is there for documentation purposes (except for the title special definition). So your statement should be : ControlClick ("ProgramName", "", "[Class:TToolBar; Instance:2]", "left", 1, 75, 25)
    1 point
  6. FrancescoDiMuro

    RegExp Help ^_^

    @caramen The pattern should be changed from this "\[.*?\]\[.*?\]\[(.*?)\]\[(.*?)\]\[*(.*?)\]*?Bonjour,([A-Z].+?)([A-Z].+?)vous.*?email:(.*?)-tél.:(.*?)\z" to this "\[.*?\]\[.*?\]\[(.*?)\]\[(.*?)\]\[(.*?)\]Bonjour,([A-Z].+?)([A-Z].+?)vous.*?email:(.*?)-tél.:(.*?)\z" The error was in the captouring group before the "Bonjour" word
    1 point
  7. FrancescoDiMuro

    RegExp Help ^_^

    @caramen There's an error in the pattern. Replace this \[*(.*?)\]*? with this \[(.*?)\] which is the third captouring group.
    1 point
  8. Could you please create a full range example text file, that we could use for a fully tested script. I must admit it is kind of annoying.
    1 point
  9. My signature will output all standard controls and all the info you will need to automate with them. the ID is the best option, the classnamenn as a last resort. The same happens with button groups. the spy tool only grabs the info for the group surrounding the controls within...example, Policy Search is a button group on your screenshot.
    1 point
  10. here a cleaner way to interrogate the services : #include <Constants.au3> Opt("MustDeclareVars", 1) Local $iStatus = _CheckService("DataCommSvc") MsgBox ($MB_SYSTEMMODAL,"",$iStatus) Func _CheckService($s_ServiceName) Local $objWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") Local $colItems = $objWMIService.ExecQuery('SELECT * FROM Win32_Service WHERE Name = "' & $s_ServiceName & '"') If Not IsObj($colItems) Then Exit MsgBox(0, "", "Not an object") If Not $colItems.count Then Return 0 ; Service not found For $oItem In $colItems If $oItem.State = "Running" then Return 1 If $oItem.State = "Stopped" then Return 2 If $oItem.State = "Not Installed" then Return 3 Next EndFunc ;==>_CheckService ps. when you post code, use <> before emoticon
    1 point
  11. Uiaspy and UIAutomation. That’s what I would try as mentioned before.
    1 point
×
×
  • Create New...