The statement “ignoring application responses” does exist. It will pass instructions to an application and won’t wait for the answer, then the script will continue executing. This is useful if you must duplicate a folder (for example) but it will take a long time. If you prefer to monitor the process, instead of waiting for the Finder to tell you “it is ready”, try this:
set folderToDuplicate to alias "path:to:dir:"
set targetFolder to alias "path:to:dir2:"
set {originalName, originalSize} to {name, size} of (info for folderToDuplicate)
ignoring application responses
tell application "Finder"
duplicate folderToDuplicate to targetFolder
end tell
end ignoring
delay 1 --> wait while duplicate process starts
repeat
set currentSize to size of (info for alias ((targetFolder as text) & originalName))
set currentPercent to round (currentSize * 100 / originalSize)
if currentPercent is 100 then
exit repeat
else
display dialog (currentPercent as text) & "% done..." with icon note giving up after 1
end if
end repeat
display dialog "Done!" with icon note giving up after 3
This statement, though, will work only if you are targetting an application. For example:
ignoring application responses
display dialog "foo"
end ignoring
This code will not finish while you don’t dismiss manually the dialog. However:
tell application "Finder"
ignoring application responses
display dialog "foo"
end ignoring
end tell
This code will pass the “display dialog” command to the Finder, and won’t wait for the result of such dialog.