Jump to content
Sign in to follow this  
JeffreyE

Send Do Script Apple event fro REALBasic app

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

Share this post


Link to post
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'

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I just got into RealBasic to do programming on my

Mac. Can you Guys/Gals suggest a forum

for RealBasic. I've been looking and haven't had

any luck. It would be greatly appreciated

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    cfmartinez1090 
×
×
  • Create New...

Important Information

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