Search found 328 matches
- Sat Apr 27, 2024 4:53 am
- Forum: Technical / Scripting
- Topic: RegEx Pattern Help
- Replies: 3
- Views: 1139
Re: RegEx Pattern Help
To develop it further: (Here you look for a position that is followed by a pair of numbers. If you find a position, then take the first number) Let>string=2;7;49;4;16;19;42;38;39;1;8;17;13;12;39;51;9;20;29;35;36;37;10;50; Let>pattern=(?=(49|38|17);(13|26|39|52))\d+ Regex>pattern,string,0,matches,num...
- Mon Jul 03, 2023 8:01 am
- Forum: Technical / Scripting
- Topic: Accessing Array elements
- Replies: 11
- Views: 11780
Re: Accessing Array elements
Hello,
This works for me:
How do you define:
This works for me:
Code: Select all
CSVFileToArray>C:\Users\Christer\Desktop\msTest.txt,msArrCurrPagePath
Let>msArrCurrPageRowLast=msArrCurrPagePath_%msArrCurrPagePath_COUNT%_0
Code: Select all
%msArrCurrPageSize%
- Sat Jun 10, 2023 6:54 am
- Forum: Technical / Scripting
- Topic: RegEx Help
- Replies: 5
- Views: 9709
Re: RegEx Help
Also I note the number of brackets (), that all capture information. Not a performance problem here but could be for larger data sets. For larger problems, if you need brackets but want to turn capturing off then simply change (xxxx) to (?:xxxx).
- Sat Jun 10, 2023 6:43 am
- Forum: Technical / Scripting
- Topic: RegEx Help
- Replies: 5
- Views: 9709
Re: RegEx Help
Hi, you can eg try: let>Pattern2=(?=((%Listb%):(\d\d?)|(\d\d?):(%Listb%));(\d\d?:\d\d?);((%Lista%):(\d\d?)|(\d\d?):(%Lista%)))[^;]+;\K[^;]+ Basically what is does is start from the left and look for positions that are followed by the three pairs (where the first and third pair contain number(s) from...
- Mon Jun 05, 2023 6:01 am
- Forum: Technical / Scripting
- Topic: Copy some data and store it to an Array without leaving current page
- Replies: 8
- Views: 11213
Re: Copy some data and store it to an Array without leaving current page
Hi, you need to use the clipboard value, eg
Code: Select all
GetClipBoard>NewValue
- Mon May 15, 2023 7:00 pm
- Forum: Beginners
- Topic: String Matching
- Replies: 5
- Views: 8078
Re: String Matching
Hi, If --> if> MessageModel --> MessageModal Let>IGNORESPACES=1 Let>VAREXPLICIT=1 Let>str_One=A Let>str_Two=B If>str_One=str_Two MessageModal>Method One Match Else MessageModal>No match with method one EndIf Let>str_One={"A"} Let>str_Two={"B"} If>str_One=str_Two MessageModal>Match Two Match Else Mes...
- Thu Apr 27, 2023 6:25 am
- Forum: Technical / Scripting
- Topic: RegEx Help
- Replies: 5
- Views: 9709
Re: RegEx Help
Hello, You can try: let>Pattern1=((%NumOrList%):(\d\d?);\K(\d\d?:\d\d?))|((\d\d?):(\1);(\d\d?:\d\d?)) (where \K instructs to forget what was just matched and continue.) or since right part is not used here: let>Pattern1=((%NumOrList%):(\d\d?);\K(\d\d?:\d\d?)) or to reduce further: let>Pattern1=(%Num...
- Tue Apr 25, 2023 2:49 am
- Forum: Technical / Scripting
- Topic: Dialog padding/margin for labels
- Replies: 7
- Views: 5471
Re: Dialog padding/margin for labels
For the last one you want to change to center alignment to get the padding uniform beginning/end.
- Thu Mar 09, 2023 4:38 pm
- Forum: Technical / Scripting
- Topic: Using xpath to find Nth instance of desired value
- Replies: 4
- Views: 3064
Re: Using xpath to find Nth instance of desired value
Hi, alternative using xPath Let>EDGEDRIVER_EXE=C:\Users\Christer\Desktop\EdgeDriver\msedgedriver.exe EdgeStart>strSessionID Let>tmpURL=file:///C:/Users/Christer/Desktop/Test.html EdgeNavigate>strSessionID,url,tmpURL // Two examples of xPath Let>strXPATH=//tr[contains(.,'Color')][2]//td[2] //Let>strX...
- Mon Feb 13, 2023 8:23 pm
- Forum: Technical / Scripting
- Topic: Screen scraping values from a page
- Replies: 9
- Views: 6269
Re: Screen scraping values from a page
If you click on "Try the new and improved charts" and "join beta" then it seems they have added a "Table View" where you can access all the Bollinger bands per day in table format. This should make your life much easier.
- Thu Feb 09, 2023 10:13 am
- Forum: Technical / Scripting
- Topic: CSVtoarray get column values
- Replies: 5
- Views: 3081
Re: CSVtoarray get column values
Hi, using CSVFileToArray and looking through the watch list, it seems rows starts at 1 and cols start at 0 (don't know why), ie you need to reflect that in the loop starts and stops. One example for dumping the (non-empty) items into a file: Let>source=C:\Users\Christer\Desktop\Test.csv Let>target=C...
- Sat Oct 15, 2022 8:09 am
- Forum: Technical / Scripting
- Topic: Unable to click the a href
- Replies: 3
- Views: 4505
Re: Unable to click the a href
Hi, I think it gets confused by the "," in your xpath. You can try
Code: Select all
Let>tmp0=//*[contains(text(),'No, thanks!')]//parent::a
ChromeFindElements>session_id,xpath,tmp0,elements
ChromeElementAction>session_id,elements_1,click
- Thu Oct 13, 2022 6:53 pm
- Forum: The Water Cooler
- Topic: The Unofficial Macro Scheduler Puzzler #14
- Replies: 5
- Views: 16160
Re: The Unofficial Macro Scheduler Puzzler #14
Hi, I agree it is not optimal if you do not know the future primes you are looking for. However, there is a way to estimate how many numbers you need in order to get n prime numbers: g(n) = nlog(n) + nlog(log(n)), where log is the natural logaritm and n the number of primes you want. It is a slight ...
- Mon Oct 10, 2022 4:20 pm
- Forum: The Water Cooler
- Topic: The Unofficial Macro Scheduler Puzzler #14
- Replies: 5
- Views: 16160
Re: The Unofficial Macro Scheduler Puzzler #14
Hi, here is my attempt... On my machine it runs in around 6-7 min. Let's see if it matches your numbers and then interesting to see what other people come up with. The SRT at the end is just there to join the array elements into a string. Timer>start Let>max=104729 Let>ctPrimes=0 ArrayDim>Primes,ctP...
- Fri Sep 16, 2022 6:21 pm
- Forum: Technical / Scripting
- Topic: JSON and UTF8 problem
- Replies: 4
- Views: 25186
Re: JSON and UTF8 problem
Hi, These encoding problems can be quite messy. Not sure what the best solution is, let's see if there are other comments. I tried two versions (in both cases using: WLN_ENCODING=UTF8) Use WriteLn> and - write text to new file - write text to existing file (empty txt file created in Notepad and save...