Search found 277 matches

by hagchr
Sun Jun 07, 2020 5:46 pm
Forum: Technical / Scripting
Topic: UTF-8 edit ini file
Replies: 11
Views: 506

Re: UTF-8 edit ini file

Good you have a working solution. Not sure if relevant/helps, I played around and note that if I create and save an empty inifile2.ini in Notepad (as UTF-8), then when running your script in MS it looks ok (shows åäö).
by hagchr
Sat Jun 06, 2020 8:31 pm
Forum: Beginners
Topic: Extracting links with numeric value in file name
Replies: 1
Views: 173

Re: Extracting links with numeric value in file name

Hi, There are different ways to solve it. If there is one link per row then one way could be (required code very short, but added explanation in case you have not worked with RegEx> before): LabelToVar>strInfo,strLinks // Use RegEx> to match strings: // https:// // followed by zero or more character...
by hagchr
Sat May 30, 2020 8:58 am
Forum: Beginners
Topic: Error [HTTP / 1.1 404 Not Found] in chromedriver
Replies: 9
Views: 380

Re: Error [HTTP / 1.1 404 Not Found] in chromedriver

I suddenly got the same problem today. Following the suggestion, I started ChromeDriver manually (as Administrator), ran the script and it started to work again. Not sure if relevant or not, before running the script I also commented out //Let>CHROMEDRIVER_EXE=c:\chromedriver.exe got a warning, but ...
by hagchr
Fri Jan 24, 2020 1:27 pm
Forum: Technical / Scripting
Topic: Remove blank lines when there are more than one of them
Replies: 10
Views: 558

Re: Remove blank lines when there are more than one of them

Sometimes I get differences using MS and RegexBuddy, but usually it relates to difference in modifier settings. Top left in RegexBuddy you have different choices for eg, case sensitivity, spacing, dot matches line breaks, etc. In MS, if unsure, it can help to include the modifier in the search patte...
by hagchr
Fri Jan 24, 2020 12:52 pm
Forum: Technical / Scripting
Topic: Remove blank lines when there are more than one of them
Replies: 10
Views: 558

Re: Remove blank lines when there are more than one of them

From the the Manual:
RegEx is compatible with the Perl 5.10 regular expression syntax using the PCRE library.
by hagchr
Wed Jan 22, 2020 8:40 pm
Forum: Beginners
Topic: Cosine function
Replies: 2
Views: 341

Re: Cosine function

Hi, According to the manual, the COS function requires the angle to be entered in radians, not degrees, see conversion below:

Code: Select all

Let>val_in_degrees=340
Let>val_in_radians={%val_in_degrees%/360*2*Pi}
Let>result={cos(%val_in_radians%)}
MDL>result
by hagchr
Wed Jan 22, 2020 9:48 am
Forum: Technical / Scripting
Topic: Remove blank lines when there are more than one of them
Replies: 10
Views: 558

Re: Remove blank lines when there are more than one of them

Hi, just an example how to solve it using Regex> You treat the text as one line and look for two or more consecutive end-of-line-characters (\R in regex language). If found replace with just two of them - %CRLF%. LabelToVar>Text,strText Let>tmp0=(?s)(\R){2,} RegEx>tmp0,strText,0,m,nm,1,%CRLF%%CRLF%,...
by hagchr
Wed Jan 08, 2020 12:09 pm
Forum: Technical / Scripting
Topic: Read checkbox from ini
Replies: 1
Views: 190

Re: Read checkbox from ini

Hi, Not sure of the State property right now but if you just use SetDialogProperty> to set the Checked property to True/False, and then show the Dialog, it should work. Dialog>Dialog1 object Dialog1: TForm Left = 361 Top = 284 HelpContext = 5000 BorderIcons = [biSystemMenu] ClientHeight = 203 Client...
by hagchr
Sun Nov 24, 2019 7:32 pm
Forum: Technical / Scripting
Topic: RegEx Help
Replies: 4
Views: 519

Re: RegEx Help

Hello, I have read that MS uses a version (not the latest) of Perl but am not sure about the details. To get blocks incl tokens you can eg use: (?s)/\*.+?\*/ To get blocks w/o tokens you can eg use: /\*\R\K(?s).+?(?=\R\*/) where (?s) turns on single line mode \R matches end of lines \K discards what...
by hagchr
Mon Jul 08, 2019 7:13 pm
Forum: Technical / Scripting
Topic: Return Value Given Code
Replies: 3
Views: 429

Re: Return Value Given Code

I feared one of those mega sheets with a lots of data which would have "clogged" any array. But if your excel sheet is simple with just the table and not too many rows then I think your solution is better.
by hagchr
Mon Jul 08, 2019 6:05 pm
Forum: Technical / Scripting
Topic: Return Value Given Code
Replies: 3
Views: 429

Re: Return Value Given Code

Hi, There are many ways to solve this, see one example below. Using VBS, the excel file is opened and the range containing the company data is copied to the clipboard and assigned to a variable. Then, based on the company id in question, the name is looked up. To use the example, you just need to ch...
by hagchr
Wed May 15, 2019 12:33 pm
Forum: General Discussion
Topic: Position of spaces
Replies: 14
Views: 5682

Re: Position of spaces

I think you need to specify that you want the second regex to be case sensitive (ie A and a are not the same). You do that by adding the modifier (?-i) to the beginning of the pattern, ie change to Let>pattern=(?-i)[^a-z ] (?-i really means turn off case insensitivity) You can also search for all th...
by hagchr
Sat Apr 27, 2019 8:12 am
Forum: Technical / Scripting
Topic: Excel Trouble
Replies: 12
Views: 1928

Re: Excel Trouble

It seems to work if the file was openend using XLOpen>, so that may be the requirement. This works for me:

Code: Select all

XLOpen>C:\Users\Christer\Desktop\CHTestGET.xlsx,1,xlBook0
XLGet>C:\Users\Christer\Desktop\CHTestGET.xlsx,xlBook
XLGetCell>xlBook,Sheet1,1,1,strCell
MDL>strCell
by hagchr
Mon Dec 03, 2018 3:57 pm
Forum: Technical / Scripting
Topic: Mousemove+Animation>ImagePos Help
Replies: 5
Views: 1023

Re: Mousemove+Animation>ImagePos Help

XArr is the name of an array which contains (possible) multiple values. These values are then referred to by using XArr_0, XArr_1, XArr_2, ... etc. depending on what findimagepos> finds. So in findimagepos> you use XArr and YArr. When you want to refer to the results in other places/comparisons you ...
by hagchr
Mon Dec 03, 2018 8:17 am
Forum: Technical / Scripting
Topic: Mousemove+Animation>ImagePos Help
Replies: 5
Views: 1023

Re: Mousemove+Animation>ImagePos Help

Hi, one thing that stands out is that your XArr and YArr resulting from FindImagePos> are really arrays and you also need to use an index, eg XArr_0 for the first match. So try %XArr_0% and %YArr_0% instead of %XArr% and %YArr%.
Sign up to our newsletter for free automation tips, tricks & discounts