AnsweredAssumed Answered

exit a script early

Question asked by CraigFiore on Oct 2, 2010

Title

exit a script early

Post

Hello, 

I am in the process of creating a script to create and/or open folders on a server that are tied to a specific record. The main issue I've been having is having FMP check to see if the server is available. With some help I have Native Apple Script that will ping the server to see if its avaliable. It looks like this:

_____________________________________

set serverPresent to false

try

setping_resultto (do shell script "ping -c 1 -t 1 192.168.XX.X")

set serverPresent to true

 

on error errStatement number errNum --errStatement holds text of error message, errNum the integer code described in either 'man ping' or sysexits.h

set serverPresent to false

 

endtry

if serverPresent is true then

try

mount volume "afp://XXXX:celoseal@192.168.XX.X/Documents"

 

endtry

endif

_______________________

This part works great. But this is only the first part of my FMP script. What I would like to do is have the FMP script end if this native script comes up false.

Thanks

Outcomes