Running sub-script without waiting for it to complete.
>>> So far this is what I have and is working <<<<
-----------------------------------------------------------
--- Calls up and runs a saved scpt file ----
-----------------------------------------------------------
tell application "Finder"
display dialog "I'm going to run a saved applescript"
delay 1
run script file "Mac Pro SSD:Users:Michael_Garito:Desktop:Test:Saved_Applescritp_Test.scpt"
display dialog "I ran a saved applescript"
end tell
-----------------------------------------------------------
This code shows the first dialog, after clicking 'ok', it calls up the script bellow and runs runs it as expected, then promprts the second dialog just as expected.
-----------------------------------------------------------
---- Saved_Applescritp_Test.scpt ------
-----------------------------------------------------------
tell application "Finder"
try
set theFilePath to (path todocuments folderfromuser domain) as text
repeat with I from 1 to 5
set theFileName to ("test" & I & ".txt")
makenewfileattheFilePathwith properties {name:theFileName}
delay 1
end repeat
on error
-- do nothing --
end try
end tell
-----------------------------------------------------------
This short script just makes five empty text files in the users (my) documents folder.
It works flawlessly.
>>>>> What I'm trying to accomplish and where I'm completely stuck... <<<<<<<
-----------------------------------------------------------
--- Calls up and runs a saved scpt file ----
-----------------------------------------------------------
tell application "Finder"
display dialog "I'm going to run a saved applescript"
delay 1
ignoring application responses
run script file "Mac Pro SSD:Users:Michael_Garito:Desktop:Test:Saved_Applescritp_Test.scpt"
end ignoring
display dialog "I ran a saved applescript"
end tell
-----------------------------------------------------------
This code shows the first dialog, after clicking 'ok', then displays the second dialog, wihout actaully runnign the test script.
What I'd like to happen is that the script is called up and ran in the back ground allowing me to move forward wihtout waiting on it to return as the result has no baring on the rest of the primary script.
Mac Pro (Early 2008), OS X Mountain Lion (10.8.2), The 8 cored beast...