Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. try also: https://github.com/mlipok/Au3WebDriver-testing
  3. added to: https://www.autoitscript.com/wiki/WebDriver#References
  4. It is a small change not a bunch of changes, so I decide to submit PR without any issue
  5. https://github.com/Danp2/au3WebDriver/pull/517 Finally, I had the need to make an appropriate change for an identical task. ps. I have only just migrated this task/project from MOZREPL, so I have only now proposed an appropriate change.
  6. Today
  7. Yesterday
  8. Hello Nine Thank you for the answer. I have to continue testing... Ideally I would like to drive my Firefox without closing my multiple FireFox windows already open. Indeed when I use Firefox in classic mode, I launch Firefox: I 'm used to retrieve all my Firefox Windows (with a lot of tabs) which are saved when I close the browser. When I try to launch piloted Firefox, AutoIt notice me that Firefox process is already open. I will try with a simple script. My aim is to fill form fields and ideally autoscroll those fields objects so as to check what the automate script really do. (I was used to use the powerFull IE UDF which was more userfriendly to program) Thanks for the help As regards A.
  9. Have you looked in the helpfile that comes with AutoIt3 before asking? There is a slim chance it in standard supported ....who knows....
  10. With this solution, this is basically only possible by separating and treating them individually.
  11. nvm - not totally woke-up, @AspirinJunkie good job.
  12. Ah yes - i hoped to bypass the "(?>\||\z)"-construct with StringStripWS but didn`t had your case in mind. So just add this and it should work: #include <Array.au3> Local $array[3] $array[0] = '' $array[1] = '' $array[2] = ' some data ' $array[1] = ' ' ConsoleWrite(StringLen($array[2]) & @CRLF) $array = _strip_AspirinJunkie2($array) ConsoleWrite(StringLen($array[0]) & @CRLF) _ArrayDisplay($array) Func _strip_AspirinJunkie2(ByRef $aArray) Return StringRegExp(_ArrayToString($aArray), "\s+(?>\||\z)(*SKIP)(?!)|[^|]+", 3) EndFunc
  13. @AspirinJunkie In some cases won't work: #include <Array.au3> Local $array[3] $array[0] = '' $array[1] = '' $array[2] = ' some data ' $array[1] = ' ' ConsoleWrite(StringLen($array[2]) & @CRLF) $array = _strip_AspirinJunkie2($array) ConsoleWrite(StringLen($array[0]) & @CRLF) _ArrayDisplay($array) Func _strip_AspirinJunkie2(ByRef $aArray) Return StringRegExp(StringStripWS(_ArrayToString($aArray), 2), "\s+\|(*SKIP)(?!)|[^|]+", 3) EndFunc
  14. You could also go about it the other way round. Instead of deleting the empty elements using StringRegExpReplace, return the non-empty elements using StringRegExp. Then you can do without lookarounds and pack the whole thing into a one-liner: Func _strip_AspirinJunkie2(ByRef $aArray) Return StringRegExp(StringStripWS(_ArrayToString($aArray), 2), "\s+\|(*SKIP)(?!)|[^|]+", 3) EndFunc
  15. This seems to work to remove that second keyboard and go back to normal. I had a bad feeling about making changes to the Region section…and wasn't disappointed.
  16. Last week
  17. Didn't test the speed so it might be faster with lookaheads. I thought it might be faster because lookaheads sometimes are time expensive but (\|\s*)* it's time expensive as well.
  18. Interesting. I agree your pattern is simpler to follow, but for some reason that escapes me, the positive lookahead is a tad (10-15%) faster on any array length. Maybe it is the capturing group that causing it to be slower ?
  19. You need one more update (don't hate me ) #include <Array.au3> Local $array[3] $array[0] = '' $array[1] = '' $array[2] = ' some data ' ConsoleWrite(StringLen($array[2]) & @CRLF) $array = StripEmpty2($array) ConsoleWrite(StringLen($array[0]) & @CRLF) _ArrayDisplay($array) Func StripEmpty2(ByRef $array, $iStart = 0) Local $sArray = StringRegExpReplace(_ArrayToString($array, Default, $iStart), "^\s*\||(?<=\|)\s*\||\|(?=[\s\|]*$)|\s*$", "") Return StringSplit($sArray, "|", $STR_NOCOUNT) EndFunc I think you can remove the positive lookahead from the last capturing group for a simpler pattern like this: ^\s*\||(?<=\|)\s*\||((\|\s*)*$) It might be slightly faster but don't expect anything considerable.
  20. @Nine Try this to see an unexpected behavior: #include <Array.au3> Local $array[10] $array[0] = " " $array[1] = " " $array[2] = " " $array[3] = " test " $array[4] = " " $array[5] = " " $array[6] = " more tests " $array[7] = " " $array[8] = "" $array[9] = " " ConsoleWrite(StringLen($array[6]) & @CRLF) $array = StripEmpty2($array) _ArrayDisplay($array) ConsoleWrite(StringLen($array[1]) & @CRLF) Func StripEmpty2(ByRef $array, $iStart = 0) Local $sArray = StringRegExpReplace(_ArrayToString($array, Default, $iStart), "^\s*\||(?<=\|)\s*\||\|(?=[\s\|]*$)", "") Return StringSplit($sArray, "|", $STR_NOCOUNT) EndFunc Spaces of the last row are added to the last non empty data due to regex pattern matching only the last pipe delimitator without the following spaces.
  21. You are sure that automating the Teradata SQL Assistant GUI is the best way to do what you want to do (btw. what do you want to achieve with your script)? You can use ODBC from AutoIt to access the database etc. etc.
  22. Sharp eyes. I changed the order of expressions in ternary operator.
  23. NP, FYI you forgot Not before StringIsSpace, and it is very fast now...
  1. Load more activity
×
×
  • Create New...