Find Text, do math, select right answer, enter

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
orosama1235
Newbie
Posts: 4
Joined: Tue Nov 22, 2016 1:43 am

Find Text, do math, select right answer, enter

Post by orosama1235 » Wed Sep 25, 2019 11:30 pm

Well i need to know if is possible to do this:
When a window like the image pops up, get the random numbers and calculate, then select the right answer below by the result of the previous calculation and press enter. Every time is random numbers that shows and always (+) and (-). Example: 1+3, 2+6, etc or 10-1, 1-8, etc. Also the position of the results changes as well.
orb.png
Last edited by orosama1235 on Tue Oct 01, 2019 3:19 am, edited 3 times in total.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Find Text, do math, select right answer, enter

Post by Dorian (MJT support) » Mon Sep 30, 2019 10:10 am

Hi Orosama,

I can't see your image. Can you post it please?
Yes, we have a Custom Scripting Service. Message me or go here

orosama1235
Newbie
Posts: 4
Joined: Tue Nov 22, 2016 1:43 am

Re: Find Text, do math, select right answer, enter

Post by orosama1235 » Tue Oct 01, 2019 2:34 am

I did it right now, sorry, first post.

orosama1235
Newbie
Posts: 4
Joined: Tue Nov 22, 2016 1:43 am

Re: Find Text, do math, select right answer, enter

Post by orosama1235 » Tue Oct 01, 2019 2:34 am

Dorian (MJT support) wrote:
Mon Sep 30, 2019 10:10 am
Hi Orosama,

I can't see your image. Can you post it please?
I did it right now, sorry, first post.
Sorry for the double post, dont know how to delete the previous answer.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Find Text, do math, select right answer, enter

Post by Dorian (MJT support) » Tue Oct 01, 2019 1:25 pm

There are quite a few obstacles here, and these systems are designed to prevent humans from cheating in games. Getting around that isn't really what we're about at MJT.

I would imagine the question text is not grabbable, but you can try using the Text Capture Wizard.

If that fails, try OCRArea. OCR can be quite time consuming though and that may be a problem with your ten second time limit.

If you can manage to extract the question text, then the next step is to parse that text using a variety of string manipulation commands within Macro Scheduler.

Then, if you've got that far, you've got to make it answer the question. Maybe the Find Object Wizard can do that. Maybe.

Or maybe some of our other users have better ideas. This isn't something we routinely do.
Yes, we have a Custom Scripting Service. Message me or go here

orosama1235
Newbie
Posts: 4
Joined: Tue Nov 22, 2016 1:43 am

Re: Find Text, do math, select right answer, enter

Post by orosama1235 » Thu Nov 14, 2019 1:02 am

Ok, and what about just to find, select and press enter in a negative value between the anwers, the negative values is always the right and there is only one negative among the others. If there is no negative values, just press escape. That can solve the problem and is easier but i dont know how to do it..

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Find Text, do math, select right answer, enter

Post by Dorian (MJT support) » Thu Nov 14, 2019 10:46 am

Maybe try OCRarea again as the recent update has made it much faster. Once you have that text you can use Position to check if the minus symbol is present.

Of use Image Recognition on that small area and just look for the -
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts