Screenshot wizzard - capture screenpart is not working

If you have found a bug please describe it here
Post Reply
Hugo
Posts: 2
Joined: 15 Jul 2017, 19:27

Screenshot wizzard - capture screenpart is not working

Post by Hugo »

Hello,
unfortunately the "capture screenpart" function does not work with my Ubuntu 16.04.3 LTS
I can not select a screen part. And i have to cancle the action wit ESC.
I testet it with the Windows version, and it works fine.

I tried Actiona 3.9.1 from the Ubuntu packages and a self compiled 3.9.2 version.

All the other screencapture actions "whole screen and select Window) are working fine too.

As a workaround I capture the whole screen and cut the part that i need with an external prog. This is very cumbersome.
Do you need more data about my system?

Regards,

Hugo
francois
Posts: 460
Joined: 18 Oct 2010, 10:33
Location: France

Re: Screenshot wizzard - capture screenpart is not working

Post by francois »

Hello,

Perhaps with a "code action" ? :

Code: Select all

//============
// parms
//============
var ImgToFind = new Image("C:/temp/to_find.jpg");
gap_x=500;
gap_y=200;
rectangle_width =150;
rectangle_height =70;
//============

//====================
rect_ = new Rect(gap_x,gap_y,rectangle_width,rectangle_height)
var screenShot = Image.takeScreenshot();
var img_rect = screenShot.copy(rect_);
Execution.pause(100)

Search_IMG_ =img_rect.findSubImage(ImgToFind,
{
confidenceMinimum: 80,
downPyramidCount: 1,
searchExpansion: 15,
 })

Execution.pause(100)	
if (Search_IMG_) //  Image found
 { 
     Search_IMG_.position.x  = Search_IMG_.position.x  + gap_x 
     Search_IMG_.position.y =Search_IMG_.position.y + gap_y
     //Search_IMG_.confidence  
 }
 else{
 Console.print("image not found");	 
 Execution.stop();
 }	 
//==============================

After this action, you can use the result "Search_IMG_.position", in a non code action, for instance :

Click on the red triangle because Search_IMG_.position is a variable
azert01.jpg
azert01.jpg (33.55 KiB) Viewed 3361 times
Francois
Hugo
Posts: 2
Joined: 15 Jul 2017, 19:27

Re: Screenshot wizzard - capture screenpart is not working

Post by Hugo »

That was a misunderstanding.
I have no problem with the the "Find Image" feature.

I habe problems with the "Image WIZARD"

Image
Post Reply