copy number from website and store it in a variable

Discuss RoboTask here
Post Reply
crisp212
Posts: 21
Joined: Mon Dec 04, 2017 7:12 pm

copy number from website and store it in a variable

Post 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
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

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

Post 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
Oleg Yershov
crisp212
Posts: 21
Joined: Mon Dec 04, 2017 7:12 pm

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

Post 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,
Attachments
Captura.JPG
Captura.JPG (16.86 KiB) Viewed 12723 times
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

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

Post 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.
Oleg Yershov
crisp212
Posts: 21
Joined: Mon Dec 04, 2017 7:12 pm

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

Post by crisp212 »

worked :) Thanks.

Regards,
Post Reply