Monday, January 22, 2018

#1 2003-01-07 09:28:41 am

bbug
Member
Registered: 2002-12-24
Posts: 10

Forcing 'tell app' to use carbon, rather than classic app

Hi All,

I'm sure this is a lot easier to do than it seems.

Here's what I'm trying to do.

I have a complex AS application I'm porting from OS 9 to OS X 10.2.3.  In addition to giving it a nice Cocoa front-end, I'm now able to do a lot of what I was doing with Scripting Additions using the handy-dandy 'do shell script' command and the wealth of Unix tools at my disposal.

The problem I'm running into is this.

The machine where I'm developing - and ultimately running - this AS App has both Classic & OS X versions of some of the apps being driven via AppleScript.  For instance, I've got both the classic & - I assume - carbonized versions of FileMaker Pro 5.5.  I need to now have the 'tell application' directive link to the carbonized FMP, as opposed to the classic version, and I'm not sure how to direct the AS compiler in AS Studio/PB to do that.

I tried the naive trick of simply changing the old FMP's name to 'FileMaker Pro for Classic'.  All that did was change the references in my AS code to 'tell application "FileMaker Pro for Classic"'.  When I tried to manually change these references to 'tell application "FileMaker Pro"', so as to force the AS compiler to bind to the proper version of the FMP, the AS compiler simply forced the references back to 'tell application "FileMaker Pro for Classic"'.

I remember learning awhile ago how this binding is created, and I vaguely remember under OS 9 it was based on the app file's type or creator.  I assume it's a bit different under OS X.

Can anyone offer a fix for this problem.

Thanks ahead of time for your help.

Cheers,
Bill Bug

Bill Bug
Senior Analyst/Ontological Engineer

Computer Vision Laboratory for Vertebrate Brain Mapping
Department of Neurobiology & Anatomy
Drexel University College of Medicine
2900 Queen Lane
Philadelphia, PA    19129
215 991 8430 (ph)


Filed under: FileMaker

Offline

 

#2 2003-05-12 08:45:18 pm

cjaeger
Member
Registered: 2003-03-15
Posts: 5

Re: Forcing 'tell app' to use carbon, rather than classic app

you can either create an alias to FileMaker Pro  in ~/Library/Scripting Additions
or simply use
tell application "Filemaker Pro.app"


Filed under: FileMaker

Offline

 

#3 2003-05-12 09:27:29 pm

Rob
Member
From:: Ohio, USA
Registered: 2002-11-20
Posts: 1886

Re: Forcing 'tell app' to use carbon, rather than classic app

I remember learning awhile ago how this binding is created, and I vaguely remember under OS 9 it was based on the app file's type or creator.  I assume it's a bit different under OS X.



This might be what you are referring to:

Applescript:

tell application "Finder" to set fmp to application file id "FMP5" as alias


Filed under: Finder

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)