Image Recognition question...

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
aboredprogrammer
Junior Coder
Posts: 40
Joined: Wed Jan 27, 2010 6:31 am

Image Recognition question...

Post by aboredprogrammer » Thu Jan 28, 2010 8:26 am

Hello,

I am very interested in trying out the Image Recognition for my program. I have a couple questions though. If I take for example image.bmp and have it click the picture if found, this will most likely work on my computer. However, I will be selling this product, so do my customers need to have these files on their computer as well in order for it to work?

I'm sorry if this makes no sense.

aboredprogrammer

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Jan 28, 2010 9:57 am

Yes, and you would also need to consider differences in bit depth, font sizes and so on. Personally, my advice is that if you want to make macros to sell to people and you have no control over the target PCs then I would avoid image recognition.

However, you can embed .bmp files in your scripts and/or include them with your installation package.

You could also capture each image at several common bit depth settings, and have say three sets of each (maybe three subfolders for each bit depth). Then have your script detect the bit depth so it knows which ones to use.

Image Recognition is a superb catch all for when there is no other way to easily locate and manipulate an object. But if you're distributing your macros to all and sundry then try to rule out those other methods first.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Post by gdyvig » Thu Jan 28, 2010 3:16 pm

If you decide to go the Image Recognition route you need to consider ALL things that affect how images are displayed. This includes all OS and application display settings. Besides bitmap depth also consider Window theme, color scheme, and effects. Since each affects the image in a different way you will get a combinatorial effect if you can impose no standard. Hopefully your customers will find your app so compelling they will be happy to adapt your standard settings, at least while playing the game. You may want to provide a way to easily switch between their normal settings and the settings required by your app.


Gale

User avatar
aboredprogrammer
Junior Coder
Posts: 40
Joined: Wed Jan 27, 2010 6:31 am

Post by aboredprogrammer » Thu Jan 28, 2010 4:13 pm

Is there any way that when they press the start button, it will detect wich OS they are using, and send a message with a question asking: This will only work in the Windows Classic theme, change now? (Yes/No)

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Post by gdyvig » Thu Jan 28, 2010 5:00 pm

The system variable OS_VER will give you the OS.

If you need more detailed information, like the Windows Theme, Color Schemes, etc you may need to identify the registry settings controlling them, use embedded vbscript, or use a theme manager.

Try googling for "windows theme vbscript" and "windows theme manager" to get some ideas.

And of course you can always have the script open up the Control Panel via the GUI, but that would be clunky.


Try out your game under several OS and desktop environments to determine what elements of the game remain unchanged. If you can build your script around those you may be able to minimize the effects of environmental differences.


Gale

User avatar
aboredprogrammer
Junior Coder
Posts: 40
Joined: Wed Jan 27, 2010 6:31 am

Post by aboredprogrammer » Thu Jan 28, 2010 8:25 pm

Hello,

Thanks for the reply gale. I have the Win7 OS, and have tried this script under EVER theme I have installed, and it always finds where the button is located :D , so I'm not going to worry about it until I run into a problem with it!

Thanks for all the help!

aboredprogrammer

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