Press ESC key or click on CANCEL button of print(ctrl+p) dialog box in MAC OS using Selenium RC
===

I am using Selenium RC to create a framework with JAVA in MAC OS and Safari browser. Now to click on the CANCEL button in the safari browser print dialog box, I am using apple script. In the same system where the project is present and the browser is opening then the apple script is working fine. But if we are trying to open the browser in some other system in the same network then the apple script is not working. Also I tried with the JAVA ROBOT Keys. The same problem also persists there.

Please help me to resolve this problem so that I can cancel the PRINT browser popup.