I wish I could find some information on what this error means.
Since I have frequently run into problems with script applications I send other people not running on their machines unless it gets recompiled on their machines, I wanted to make a script that will do that. In other words, the target script I want them to have is included in a “master” script whose job it is to make an application of the target script on their machine.
That’s the big idea.
The first implementation of this, of course, is a really simple example in which the master script gets a file path, puts it in a property that is read by the target script, saves the target as an app, and then runs it. When I run the master script in Script Editor, it all works fine, but after the target runs successfully, I get the dreaded “Connection is invalid” error.
If I make the master script into an app and run it, the same thing happens except that instead of “Connection is invalid,” I get an “error -10873,” whatever that is. However, it seems pretty likely that it’s the same problem manifesting itself differently because the master is being run as an app rather than in Script Editor.
Anybody have any idea what’s going on?
Thanks in advance,
Larry the O
property fileToOpen : “”
tell application “Microsoft Word”
open file fileToOpen
choose file with prompt “Choose an MS word file for this test.”
set fileToOpen to the result as string
set deskPath to path to desktop folder as string
set savePath to deskPath & “HeatherTest1.app”
store script fileOpenTest in file savePath
tell application savePath to run