Screenvisible() not returning Dock dimensions; Bug?

Hello,

I’ve spent awhile searching for an answer here, but cannot find any mention of what appears to be a bug in screenvisible():

When using screenvisible([screen],Width) without further modification, the Dock is accounted for and Width returns the expected value, regardless is Dock position.

With the Dock located on the right side of the screen of a multiscreen setup, the Dock is ignored when using the Width variable on a standard ‘Right Column’ or any predefined ‘Right’ actions; further, when attempting to modify Width by any value, the returned value is incorrect. e.g., on a 1440 x 900 display (located on the right side of the Main display including Dock on right edge):

SCREENVISIBLE(front,Width) -> 1397 (correct)
SCREENVISIBLE(front,Width)*50% -> 822 (incorrect; expect ~699)
furthermore:
SCREENVISIBLE(front,MidX) -> 720 (incorrect; expect ~699)

This does not occur when the Dock is on the left. Any default included Resize Window Left/Right action properly calculates and accommodates the Dock.

I can obviously install calculations to account for the Dock on the right, but then the macro is no longer very portable.

Any ideas? Is this a bug, or are my expectations incorrect?

It's hard to say exactly where things are going wrong for you from what you are showing, but I till say it is highly unlikely you can get

SCREENVISIBLE(front,Width) -> 1397 (correct)
SCREENVISIBLE(front,Width)*50% -> 822 (incorrect; expect ~699)

Regardless of what bug there might be in SCREENVISIBLE.

So while it is always possible there is a bug in the SCREENVISIBLE function, at the moment I would suspect there is an issues with your understand and/or use of the functions.

Firstly, keep in mind that the "front" screen will change to whichever screen has the front window on it, so that is perhaps part of the problem.

Try this, use the action Set Variable to Calculation, with the calculation:

SCREENVISIBLE(Front,Left),SCREENVISIBLE(Front,Width),SCREENVISIBLE(Front,Right),SCREENVISIBLE(Front,Width)*50%,SCREENVISIBLE(Front,MidX)

or better yet, use this action.

Set Variable to Calculation.kmactions (543 B)

And then upload a screenshot of the action showing the resulting values if you still think the results are incorrect.