you could first use the screentosphere() action to get the position in degrees and then remap them linearly to the pixelsize of the source image.
Here a full example code that does everything automatically for multires-cube panos (it takes the source pano size from largest multires level):
Code
<!-- first get the h/v coordinates in degrees from the current mouse position -->
screentosphere(mouse.x, mouse.y, h, v);
<!-- get the highest/largest multires level index (0-based) -->
sub(largestlevelindex, image.level.count, 1);
<!-- get the width of the largest levels -->
copy(cubewidth, image.level[get(largestlevelindex)].tiledimagewidth);
<!-- calculate the spherical pano size -->
mul(spherewidth, cubewidth, Math.PI);
mul(sphereheight, spherewidth, 0.5);
<!-- linearly map the degrees values to the pixel positions -->
div(px, h, 360);
add(px, 0.5);
mul(px, spherewidth);
roundval(px);
div(py, v, 180);
add(py, 0.5);
mul(py, sphereheight);
roundval(py);
<!-- done - trace the results -->
trace('pixelpos=',px,'/',py);