-1

I am trying to execute an apple script to attach a file to outlook. Now when i attach a certain file, i get an expected error popup saying, "i do not have the permission to attach this file. Click ok or cancel". This is expected result. Now i need to handle this popup by clicking on the "OK" button of the popup. But my script halts at the point where the popup is launched. And the code to click the button does not gets executed. I should manually click ok and the code continues with the next steps. Please let me know how can i handle this..

1

Enclose your point of possible failure in a 'try' block, & provide a 'no fail' for the error.

try 
-- your code
on error
-- do nothing
end try
  • If on error you're going to do nothing, then an error handler is not necessary with the try statement. – user3439894 Apr 19 '17 at 14:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .