realbasic-nug
[Top] [All Lists]

Passing strings to applescript

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Passing strings to applescript
From: "Stephen A. Cochran Lists" <stephen dot a dot cochran dot lists at cahir dot net>
Date: Tue, 31 Jan 2006 16:01:32 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com

I have broken down my problem to calling an applescript to the following:

A simple project, one button to choose a file, setting the result to a folderitem:

  currFile = GetOpenFolderItem("")
  StaticText1.text = currFile.name

  Test2(currFile.AbsolutePath, currFile.parent)

  StaticText2.text = "Done"

The Test2 applescript was added to the project and reads as follows:

on run {currFile, destFolder}
        tell application "Mail"
                set newMessage to make new outgoing message
                tell newMessage
                        set visible to true
                        set content to currFile & return & destFolder
                end tell
                activate
        end tell
end run


the displays are simply to see if the variables are getting into the applescript.

Instead I'm getting the following error:

Runtime Error 4: Faiiled Assertion

Location: SpawnCompilerInterface.cpp:396
Failure Condition: index >= 0 and index < bufCount
Failure Message:

Any ideas? The only thing that is different than the user guide is that the script editor doesn't have the choice to save as a compiled script any more. But it's saved as a script and it compiles and runs normally.

Steve Cochran
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>