How to use scaleToSize parameter to find image scaled non-proportionally

image “image100x100” size is 1006*753.

I can use following script to find image “image100x100” with 50% scale:
put imageFound(imageName: “image100x100”, scale: 0.5)

I can use following script to find image “image100x100” with 100% scale:
put imageFound(imageName: “image100x100”, scaleToSize: [1006, 753])

But I can’t use following script to find image “image100x100” with 50% scale:
put imageFound(imageName: “image100x100”, scaleToSize: [1006*.5, 753*.5])

What the problem?

The issue with the script that isn’t working could be due to the use of the multiplication operator * within the array. In many scripting languages, you cannot perform arithmetic operations directly inside an array or function argument list.

Calculate the scaled dimensions first

scaled_width = 1006 * 0.5
scaled_height = 753 * 0.5

Then pass the calculated dimensions to the function

put imageFound(imageName: “image100x100”, scaleToSize: [scaled_width, scaled_height])

Thanks, the Eggplant supporter has claimed this is a bug.

Adding parentheses made the code work for me by forcing the values to be calculated first before they were passed as scaleToSize parameters:
put imageFound(imageName: “image100x100”, scaleToSize: [(1006*.5),(753*.5)])