All Activity
- Today
-
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.
-
SOLVE-SMART reacted to a post in a topic: WinWaitActive () does not pop-up corresponding window - (Moved)
-
Zedna reacted to a post in a topic: Button Icons With _WinAPI_ExtractIconEx
-
Fastest Way to Delete Empty Records in 1d Array
AspirinJunkie replied to gcue's topic in AutoIt General Help and Support
With this solution, this is basically only possible by separating and treating them individually. -
Fastest Way to Delete Empty Records in 1d Array
Nine replied to gcue's topic in AutoIt General Help and Support
nvm - not totally woke-up, @AspirinJunkie good job. -
Andreik reacted to a post in a topic: Fastest Way to Delete Empty Records in 1d Array
-
Fastest Way to Delete Empty Records in 1d Array
Andreik replied to gcue's topic in AutoIt General Help and Support
@AspirinJunkie Nicely done and performs really good. -
AspirinJunkie reacted to a post in a topic: Fastest Way to Delete Empty Records in 1d Array
-
Fastest Way to Delete Empty Records in 1d Array
AspirinJunkie replied to gcue's topic in AutoIt General Help and Support
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 -
Zedna reacted to a post in a topic: Issue with accented characters (CLI → clibpoard)
-
Fastest Way to Delete Empty Records in 1d Array
Andreik replied to gcue's topic in AutoIt General Help and Support
@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 -
Fastest Way to Delete Empty Records in 1d Array
AspirinJunkie replied to gcue's topic in AutoIt General Help and Support
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 - Yesterday
-
Fastest Way to Delete Empty Records in 1d Array
Andreik replied to gcue's topic in AutoIt General Help and Support
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. -
Fastest Way to Delete Empty Records in 1d Array
Nine replied to gcue's topic in AutoIt General Help and Support
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 ? -
Fastest Way to Delete Empty Records in 1d Array
Andreik replied to gcue's topic in AutoIt General Help and Support
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. -
Fastest Way to Delete Empty Records in 1d Array
Nine replied to gcue's topic in AutoIt General Help and Support
Yep, good catch, pattern updated, once more. -
Fastest Way to Delete Empty Records in 1d Array
Andreik replied to gcue's topic in AutoIt General Help and Support
@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. -
Unable to click element in Teradata SQL Assistant
water replied to Luli's topic in AutoIt General Help and Support
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. -
Fastest Way to Delete Empty Records in 1d Array
Andreik replied to gcue's topic in AutoIt General Help and Support
Sharp eyes. I changed the order of expressions in ternary operator. -
Fastest Way to Delete Empty Records in 1d Array
Nine replied to gcue's topic in AutoIt General Help and Support
NP, FYI you forgot Not before StringIsSpace, and it is very fast now... -
WebDriver UDF (W3C compliant version) - 2024/02/19
FrancoBordin replied to Danp2's topic in AutoIt Example Scripts
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 -
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
-
Ingvar joined the community
-
Fastest Way to Delete Empty Records in 1d Array
Andreik replied to gcue's topic in AutoIt General Help and Support
Sorry, probably didn't refresh the page before. -
_Service_UDF v4 : Build your own service with autoit code
cramaboule replied to arcker's topic in AutoIt Example Scripts
This is it!!! I found why it stopped by itself !