Hi Tim,
As RGS mentioned above, you could wrap the copying/duplicating command (or the entire script) inside a 'with timeout ...' block. This is one of two possible methods, and is the most general one. The second method is appropriate only in certain specific situations, and would involve wrapping the copying/duplicating command inside an 'ignoring application responses' block (this would be suitable only if the rest of your script doesn't depend on the result of the copying).
It is important to emphasise that, according to Apple, either of these two methods might not work unless you are copying the file by using the commands of an
application such as the Finder [or the commands of a scripting addition (OSAX) that occur within a 'tell application ...' block].
Just to provide a little more detail on the second method, the basic idea is to simulate "multitasking" in the sense that your script wouldn't wait for the copy to complete. [As mentioned earlier, this would be suitable only if the rest of your script doesn't depend on the result of the copying.] For example:-
Code:
[...]
ignoring application responses
tell application "Finder"
duplicate source reference to target reference
end
end
[...]
[BTW, Apple's official 'AppleScript Language Guide' is a good source of information about the relatively obscure features available in AppleScript. See the
New to AppleScript thread for a link to the official 'AppleScript for Scripters' web page (where the online/PDF versions of the 'AppleScript Language Guide' can be found), along with other links to interesting AppleScript-related web sites.]
Regards,
--Paul