Search found 293 matches

by hagchr
Mon Apr 12, 2021 4:24 pm
Forum: Technical / Scripting
Topic: Solving a puzzle
Replies: 23
Views: 1210

Re: Solving a puzzle

Interesting problem...
Is it always along x-axis or could it also be y-axis or both?
Can you click anywhere on the slider to move it to that place, or do you need to click on the "handle" and then drag it to where you want it?
Is it in a public place somewhere (web site) that one can use to test?
by hagchr
Fri Mar 19, 2021 9:00 am
Forum: Technical / Scripting
Topic: passing parameters and compiling
Replies: 9
Views: 518

Re: passing parameters and compiling

Hi,

If I compile your script (leaving include parameters empty) then I get:

C:\Users\Christer\Desktop>tmpTBD.exe
---> displays default value

C:\Users\Christer\Desktop>tmpTBD.exe/v_test=Friday
---> displays Friday
by hagchr
Sun Mar 07, 2021 11:09 am
Forum: Technical / Scripting
Topic: EasyPattern bug?
Replies: 1
Views: 186

EasyPattern bug?

This simple example looks strange compared to what is written in the text referred to in the help file. "longest" should make it match as much as possible, ie in the example it should match "abc" but here it results in three matches "a", "b", and "c". "shortest" is the other way around - should matc...
by hagchr
Sun Mar 07, 2021 10:52 am
Forum: Technical / Scripting
Topic: Easy Pattern syntax for Groups
Replies: 2
Views: 223

Re: Easy Pattern syntax for Groups

I agree with Bob, normal RegEx handles groups etc, there is no need to go to for EasyPattern just for that. Actually, personally, I find the normal RegEx (much) easier and like Bob never bothered with EasyPattern. Out of curiosity I looked at your questions and if you are just looking for the matche...
by hagchr
Fri Mar 05, 2021 10:40 am
Forum: Technical / Scripting
Topic: EasyPatterns Not so easy
Replies: 7
Views: 461

Re: EasyPatterns Not so easy

For EasyPattern you need to set the third parameter to 1, ie. RegEx>...,...,1,...

Bob's suggestion works as well, you may need to add a space char in the last bracket if that should be allowed as optional.
by hagchr
Tue Dec 29, 2020 11:40 am
Forum: Scripts and Tips
Topic: Extracting with ChromeDriver and RegEx
Replies: 0
Views: 899

Extracting with ChromeDriver and RegEx

I raised the following with the help desk some time ago but did not get any reply so I put it here as it may be helpful for some. Not sure if it is an issue or normal/expected. When extracting text using ChromeDriver you typically get the text with Unix (LF) instead of Windows (CRLF). This means you...
by hagchr
Tue Dec 29, 2020 10:33 am
Forum: Technical / Scripting
Topic: Issue when pasting into MS Editor
Replies: 15
Views: 1254

Re: Issue when pasting into MS Editor

God Fortsättning och Gott Nytt 2021!

I opened an extracted MS help page in Notepad, and see it is using Unix (LF) whereas my text files are usually using Windows (CRLF). Not sure if that has anything to do with the issue? Irritating but until there is info/solution I guess one has to live with it.
by hagchr
Mon Dec 28, 2020 11:35 am
Forum: Technical / Scripting
Topic: Issue when pasting into MS Editor
Replies: 15
Views: 1254

Issue when pasting into MS Editor

I have the problem that when I copy things from the forum or MS help files (or any web text really), into the MS editor, I get the annoying message "Cannot open clipboard: Access is denied". I click ok and paste again and then it works. I am using Win 10 pro and the latest version of MS (15.0.15). D...
by hagchr
Sun Dec 27, 2020 4:27 pm
Forum: Technical / Scripting
Topic: Non-Capturing Group (RegEx)
Replies: 1
Views: 3721

Re: Non-Capturing Group (RegEx)

I just saw this unanswered post from 2 years ago. In the unlikely event it has not been solved. To make a group non-capturing, just add ?:

Capturing: (\d+)
Non-capturing: (?:\d+)
by hagchr
Sun Dec 27, 2020 3:55 pm
Forum: Technical / Scripting
Topic: Work Opportunity
Replies: 4
Views: 636

Re: Work Opportunity

I think this has been sorted already, but it was a good training exercise so I did some work on getting data from the simple web site. I post the script in case anybody is interested. The result can then be copied from the message box and pasted into excel. // Needs to be adjusted with location of c...
by hagchr
Sun Dec 27, 2020 10:07 am
Forum: Technical / Scripting
Topic: Consume a result
Replies: 11
Views: 1015

Re: Consume a result

Hi again, Looking at your regex: RegEx>\b(\d\d?);(?!.*\b\1\b),CompareStrings,0,match,nom,1,,Results 0: COMPARESTRINGS=24;36;50;8;24;16;2;5;51; You go through your string left to right and try to find/match two digits and a ; and then look ahead to ensure that there are no duplicates to the right. Wh...
by hagchr
Sat Dec 26, 2020 7:59 pm
Forum: Technical / Scripting
Topic: Consume a result
Replies: 11
Views: 1015

Re: Consume a result

If I adjust your script and add the number 2 to Using then...

Code: Select all

let>Using=24:36:2:
let>MyList=50;8;24;16;2;5;51;

Let>CompareStrings=%Using%%MyList%
StringReplace>CompareStrings,:,;,CompareStrings
RegEx>\b(\d\d?);(?!.*\b\1\b),CompareStrings,0,match,nom,1,,Results
MDL>Results
by hagchr
Sat Dec 26, 2020 7:54 pm
Forum: Technical / Scripting
Topic: Consume a result
Replies: 11
Views: 1015

Re: Consume a result

Hi again, In your previous example, $Base includes all numbers that do not have a duplicate, as well as all duplicates. So really you want everything except $Base. I think the correct way to refer to a named group in the replacement field would be $<Base> not $Base, so I think $Base is wrong syntax ...
by hagchr
Sat Dec 26, 2020 10:06 am
Forum: Technical / Scripting
Topic: Consume a result
Replies: 11
Views: 1015

Re: Consume a result

Hi again, Great that it works and all the best for 2021! The story could have ended here if it wasn't for curious-me. Looking at your final pattern I see you first match/find all numbers that do not have a duplicate, as well as all extra duplicates (smart!). Then you replace the result with $Base gi...
by hagchr
Fri Dec 25, 2020 3:44 pm
Forum: Technical / Scripting
Topic: Consume a result
Replies: 11
Views: 1015

Re: Consume a result

Hi! Nice to see someone interested in Regex - your best friend and your worst enemy. If I understand it correctly you just want to remove duplicates. You can do this by simply taking the matched numbers and replace them with nothing, ie leave the replacement string empty. Your example without the na...
Sign up to our newsletter for free automation tips, tricks & discounts