Search found 331 matches

by hagchr
Fri Oct 04, 2024 5:07 pm
Forum: Technical / Scripting
Topic: Strip out specific characters from string
Replies: 9
Views: 2489

Re: Strip out specific characters from string

Hi, sorry for the late reply, but in case you have not resolved it... The code should normally take care of the ' as well, see example below. Is something else happening? You probably have something like "'" that needs to be handled. Maybe you can paste a couple of HTML lines around and inc...
by hagchr
Mon Sep 23, 2024 6:03 pm
Forum: Technical / Scripting
Topic: Strip out specific characters from string
Replies: 9
Views: 2489

Re: Strip out specific characters from string

Hi, expanding on Dorian's suggestion: For Regex, \K means forget what you have matched already and continue, so in the example you match dc:title until content=" then forget everything (\K) and continue and match subsequent characters that are not ", ie Warriors:. Hope it helps. //Read source file i...
by hagchr
Thu Jul 18, 2024 4:26 pm
Forum: Technical / Scripting
Topic: Find Sort Order and Count Character Position
Replies: 2
Views: 2427

Re: Find Sort Order and Count Character Position

Hi, I think you can use regex to find the sort order, or to check if sort order is higher than position 8. The following lines will extract the sort order for all examples (by taking the right-most digits in each case), and separately, also extracting the sort order, only for examples with numbers h...
by hagchr
Sat Apr 27, 2024 4:53 am
Forum: Technical / Scripting
Topic: RegEx Pattern Help
Replies: 3
Views: 5426

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...
by hagchr
Mon Jul 03, 2023 8:01 am
Forum: Technical / Scripting
Topic: Accessing Array elements
Replies: 11
Views: 17323

Re: Accessing Array elements

Hello,

This works for me:

Code: Select all

CSVFileToArray>C:\Users\Christer\Desktop\msTest.txt,msArrCurrPagePath
Let>msArrCurrPageRowLast=msArrCurrPagePath_%msArrCurrPagePath_COUNT%_0
How do you define:

Code: Select all

%msArrCurrPageSize%
by hagchr
Sat Jun 10, 2023 6:54 am
Forum: Technical / Scripting
Topic: RegEx Help
Replies: 5
Views: 12153

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).
by hagchr
Sat Jun 10, 2023 6:43 am
Forum: Technical / Scripting
Topic: RegEx Help
Replies: 5
Views: 12153

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...
by hagchr
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: 13394

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
by hagchr
Mon May 15, 2023 7:00 pm
Forum: Beginners
Topic: String Matching
Replies: 5
Views: 12401

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...
by hagchr
Thu Apr 27, 2023 6:25 am
Forum: Technical / Scripting
Topic: RegEx Help
Replies: 5
Views: 12153

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...
by hagchr
Tue Apr 25, 2023 2:49 am
Forum: Technical / Scripting
Topic: Dialog padding/margin for labels
Replies: 7
Views: 7239

Re: Dialog padding/margin for labels

For the last one you want to change to center alignment to get the padding uniform beginning/end.
by hagchr
Thu Mar 09, 2023 4:38 pm
Forum: Technical / Scripting
Topic: Using xpath to find Nth instance of desired value
Replies: 4
Views: 4256

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...
by hagchr
Mon Feb 13, 2023 8:23 pm
Forum: Technical / Scripting
Topic: Screen scraping values from a page
Replies: 9
Views: 9227

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.
by hagchr
Thu Feb 09, 2023 10:13 am
Forum: Technical / Scripting
Topic: CSVtoarray get column values
Replies: 5
Views: 4400

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...
by hagchr
Sat Oct 15, 2022 8:09 am
Forum: Technical / Scripting
Topic: Unable to click the a href
Replies: 3
Views: 5582

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
cron
Sign up to our newsletter for free automation tips, tricks & discounts