Jump to content

All Activity

This stream auto-updates

  1. Today
  2. 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.
  3. Have you looked in the helpfile that comes with AutoIt3 before asking? There is a slim chance it in standard supported ....who knows....
  4. With this solution, this is basically only possible by separating and treating them individually.
  5. nvm - not totally woke-up, @AspirinJunkie good job.
  6. 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
  7. @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
  8. 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
  9. 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.
  10. Yesterday
  11. 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.
  12. 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 ?
  13. 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.
  14. @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.
  15. 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.
  16. Sharp eyes. I changed the order of expressions in ternary operator.
  17. NP, FYI you forgot Not before StringIsSpace, and it is very fast now...
  18. Hi there. Yes, in particulare something like the first link you posted, but looks like that isn't immediately obtainable from webdriver itself, due to their policy. Quoted from there: "Unfortunately, it doesn't look like you can do that with selenium alone in an automated fashion, as this is against their design principles for selenium. I don't agree that it is (since it supports getting cookie information -- what user actually goes through and parses through their cookies?). I'm actually afraid that what i'm looking for is something out of the autoit udf's developer(s) control due to webdriver API limitations about that specific session info. Hope i'm wrong. Thanks again
  19. hi all i am new to Autoit so please be gentle i am trying to create script which will open virtual machine automatically in Vmware Workstation in Fulll screen and after that send CTRL-ALT m which will activate multi monitor support for that machine. starting the virtual machine is easy as you can use switch with vmware.exe for that, for example: "C:\Program Files (x86)\VMware\VMware Workstation\vmware.exe" -X E:\vm\Win8.1-test1\Win8.1-test1.vmx so i created a script that does that, and was hoping sending Ctrl Alt M was also that easy but no it was not. this is the script i created Run("C:\Program Files (x86)\VMware\VMware Workstation\vmware.exe -X E:\vm\Win8.1-test1\Win8.1-test1.vmx") Sleep(30000) WinActivate("[TITLE:Win8.1-test1 - VMware Workstation]", "") Send("!^m") i am putting in 30 seconds delay to give the vm time to boot up and start vmware tools which is needed. i am not able to get the focus on the virtual machine, the focus is on the Vmware program as i can send CTRL N for new machine and that pops up successfully. does someone have idea what i am doing wrong? BR Ingvar
  1. Load more activity
×
×
  • Create New...