January 12, 200125 yr 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
January 13, 200125 yr 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'
January 15, 200125 yr Author 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
April 25, 200322 yr 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
Create an account or sign in to comment