MACSCRPT Archives

May 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
SUBSCRIBE MACSCRPT Palav <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Sat, 6 May 2006 09:31:26 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
I m executing in script editor

        tell application "FileMaker Pro"
                  open file "TIGER:TestingData.fp7" with passwords 
"admin" for Accounts "Admin"
        end tell

& it is running successfully.

But when I try to run above code in cocoa using NSApplescript & 
NSAppleEventDescriptor class as follows:

NSAppleScript *scriptObject = [[NSAppleScript alloc] initWithSource: 
@"tell application \"FileMaker Pro\" open file
\"Tiger:TestingData.fp7\" with passwords \"admin\" for Accounts \"Admin\""];
NSAppleEventDescriptor *returnDescriptor = [[NSAppleEventDescriptor 
alloc] init];
returnDescriptor scriptObject executeAndReturnError: &errorDict];
[scriptObject release];

but when I run above code, I get descriptorType of returnDescriptor 
as kAENullEvent & thats why file doesn't get open.

What can be the solution?

Thanks,
Palav

ATOM RSS1 RSS2