Jump to content

Send Do Script Apple event fro REALBasic app


This topic is 7665 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Does anyone know the proper syntax to send the Do Script Apple Event from a REALBasic app? I've gone into the reference for Filemaker and Apple Events, but all the examples are for AppleScript and Frontier. I believe the following is the start:

dim ae as appleevent

ae = newappleEvent("misc", "dosc", "FMP5")

But I can't figure out the syntax for the next statement which is to send the event. I think it's something like...

ae.Send....

But after that...?

Thanks!

Best Regards,

Jeffrey Ellis

Link to comment
Share on other sites

You can use Applescript in REALBasic a lot easier than Apple Events. The following Applescript example will run the FileMaker script "MyCoolScript" in the database "MyDatabase."

code:


on run

tell application "FileMaker Pro"

activate

if not (exists (window "MyDatabase")) then

set myFile to choose file with prompt "Select the file 'MyDatabase'
Link to comment
Share on other sites

Thanks, Bob!

For the benefit of those interested in this subject, I also wanted to post this reply from Paul Scandariato Intelli Innovations, Inc.:

dim event as appleevent

event = newappleEvent("misc","dosc","FMP5")

event.stringParam("----") = "My Wonderful Script"

if not event.send then

msgBox "Darn!"

end if

However, in order to specify the proper file, you will either need to set up a object specifier, or send FMP a command to open a specific file - if it's already open, then FMP would just

bring it to the front.

Best Regards,

Jeffrey Ellis

Link to comment
Share on other sites

  • 2 years later...

This topic is 7665 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.