Hello,
I want to copy a specific text or a line on a webpage to clipboard. I used a Javascript made by ccstone for getting webpage text.
https://forum.keyboardmaestro.com/uploads/default/original/2X/9/9c9c76ec73f79a90cfcc6b0a487b65a6f8fb9cc9.png
Here is the webpage text taken with the script above. [link]
The line which needs to be copied is ($0.080/word) $297.36 which is under Incomplete jobs. The number, the amount of money(in this case, 297.36), changes every time.
Thanks a lot
Kyu
Hello,
I want to make an action that is executed when a specific number on a webpage exceeds a certain amount. I use a Javascript made by ccstone for getting webpage text.
Here is the webpage text taken with the script above. [link]
The number which needs to be read is $58.80 which is under "Reviewable jobs". The number, the amount of money, changes. How can I make an action executed when the number is over $10.00 or whatever?
Thanks,
Kyu
You can use the Search Variable action to search for the desired text using the regular expression:
(?s)Reviewable jobs.*?/word.*?\$(\d+\.\d\d)
And then the If Then Else action with a Calculation condition to test if the value is greater.
The meaning of the regular expression is:
(?s) - treat the entire thing as a single line, so . matches line ending characters.
Reviewable jobs - match the explicit text "Reviewable jobs"
.*? - minimally match zero or more of any character (including line ending characters)
/word - match the explicit text "/word"
.*? - minimally match zero or more of any character (including line ending characters)
\$ - match the explicit text "$"
(\d+\.\d\d) - capture match a decimal number, 1 or more digits, ".", 2 digits
1 Like
Thank you very much for your kind explanation, Peter. It helped me a lot.
1 Like