UiBot : Robots for Everyone!

Your Location: Training Center> Documents > 22.Note Points
22.Note Points

In the last chapter, we learned about the objective command, and in this chapter we learned about the command without a target or objective. In fact, most cases that combine images, OCR, and other commands have to deal with the nonobjective command.

So, should we choose a command with an objective, or an command without an objective? As long as the appropriate interface elements are targeted, priority should be given to the commands with a target because commands without a target, especially in relation to images and OCR commands, have the following disadvantages:

• The speed is much slower than a targeted command.

• It may be affected by obscureness. Even if only a portion of the image is obscured, it may significantly affect the entire process.

• Image files are most commonly used but these can be lost on your computer.

• The OCR command must also be connected to the Internet to run.

62 Although there are many, these weaknesses can be mitigated. The following tips can help you make better use of image and OCR commands:

1.First, try to make the image as small as possible while capturing all of the necessary information. Not only will this improve the speed, but it will also be less susceptible to blurriness. For example, the "login" button in the figure below does not look up the entire button as an image. It just chooses the most critical part as shown on the right side.

!! [Select a smaller screenshot] (imgsTarget/14.png){width="80%"}

2. Second, most image commands support properties of "similarity," which have an initial value of 0.9 and may cause "wrong choices" if set too low. If set too high, this can lead to a "missed" (the concepts of "wrong" and "omitted" are referred to in [the previous chapter] [target editing]). You can adjust based on actual situation and test its effect, choosing the best degree of similarity.

The screen resolution and scaling ratio can have a critical impact on the image command as well because at different resolutions, the interface display of the software may be completely different, resulting in the 63 invalidation of the image command.

Finally, both the image and OCR command can be tested with an absolute path when an image file is required. In the previous example for: ```D:\1.png,” it required that the machine running the process had the same file and path otherwise an error would occur. One way to improve this is to see a folder called res where your process resides. Then you can put images or other files there and use ``@res' 1.png' ``' to represent this document in the process. This way, the current process will automatically bring this file when it is published to the UiBot Worker for use and whatever path UiBot Worker places this process under, it will automatically modify the path represented by the prefix.

Suggested reading
Are You Ready to Explore the RPA World?