Page 1 of 1

copy number from website and store it in a variable

Posted: Wed Jan 10, 2018 6:33 pm
by crisp212
Good afternoon Oleg.

This question is a bit more complicated a think: Is it possible to copy a number in a static place in a website and pass it into a variable?

So what I want is, with a recorded action: is select a number in a fixed place in a website (drag mouse over it to select it), copy it (doing the right click and copy), pass it to a variable and then compare if its bigger or smaller than 0 or see if its negative or positive. Is it possible? The format of the number is “%xx.xx” if it’s positive and “-%xx.xx” if its negative (it can be x.xx or xx.xx really). Thank you in advance.

Regards,


Crisp212

Re: copy number from website and store it in a variable

Posted: Thu Jan 11, 2018 1:15 pm
by Oleg
I think that it's better to get the text from the page
Ctrl+A - select all Ctrl+C - copy to clipboard
and retrieve the value from this text by using regular expressions or some other criteria

Re: copy number from website and store it in a variable

Posted: Mon Jan 15, 2018 10:38 pm
by crisp212
Hi Oleg!

Thanks for the fast answer.

Got it :) regex is just amazing.

Got a problem though: The task runs every 15 minutes and after the 1st run, it doesnt work :( I found out that if the % changes, it doesnt match from the "Window Caption" from the first "move object" before ctr+a/ctr+c. So if the % doesnt match, it doesnt detect the window.

Can you see another way?

Regards,

Re: copy number from website and store it in a variable

Posted: Tue Jan 16, 2018 8:48 am
by Oleg
You can specify only string
/ pxzy.com - Google Chrome
and switch off the checkbox Must Match Exactly

This is a permanent part of the caption of your window.

Re: copy number from website and store it in a variable

Posted: Sat Jan 20, 2018 12:10 am
by crisp212
worked :) Thanks.

Regards,