The echo statement might trigger a call to getFrameWidth().
Try to do an "old style" echo like 'echo "Width: " & $width' directly after a getFrameWidth() call and assigning its result ("let width = getFrameWidth(...)".
The echo statement might trigger a call to getFrameWidth().
Try to do an "old style" echo like 'echo "Width: " & $width' directly after a getFrameWidth() call and assigning its result ("let width = getFrameWidth(...)".