Discerning Between FileMaker 6 and FileMaker 8 in tell blocks?

[I didn’t post this to the FaceSpan forum since I’m fairly sure this would be a problem with or without FaceSpan]

I have a script I need to make portable that involves FileMaker in its machinations. However, the workstations it will be used on have FileMaker 6 and FileMaker 8 on them.

When running the script stand-alone, I can choose which FileMaker at compile time (FileMaker 8 in my case). However I know from experience if I went this route I’d have to recompile at every workstation, or use double-tells to work around it to some degree.

More recently, I’ve relied on “wrapping” applications as FaceSpan projects to make them more portable, and to add GUI niceties like programmable progress bars.

However, when I compile in FaceSpan, and tell it to use FileMaker 8, it oddly chooses FileMaker 6 whenever the built file is run.

I’m hoping there is some AppleScript, FaceSpan, or AS Studio advice someone can give me I can adapt to the situation.

One other piece of information…our Applications folders are very standardized, so I can point to an absolute path to FileMaker Pro 8, but the tell block doesn’t seem to like “tell application ” as a syntax.

Partial answer to my own question via an associate here in the building: change the name of one of the FileMakers.

FileMaker 6 and FileMaker 8 are both named “FileMaker Pro” (a practice I really wish software companies would stop). If I renamed one of them (say “FileMaker Pro 8”) then that fixes the compile referencing issues. We have enough control over the workstations to renamed all copies of FileMaker Pro 8 and manage that oddity going forward.

However…
Are there any ramifications I should be aware of doing this? Will it mess-up third party solutions? Any other “gotcha’s” with doing this before I decide it’s going to be policy in order to get my solutions to work?

For the record, we’ve never purchased an outside FileMaker solution, we’ve always designed them inhouse. And to date none of my solutions have left the building to be used elsewhere, at least none of the ones using FileMaker. So maybe the “closed loop” nature of my environment is an important factor?

Kevin,

I have had problems with scripting Illustrator on my computer when I have Illustrator 8 open instead of Illustrator CS. All code referencing Illustrator CS becomes Adobe Illustrator® 8 automatically. It doesn’t matter if the script is an app or a script either.

Maybe you could use a “get properties” on both apps by using a choose file and see if there is any process identifier, name, or some such that will allow you to choose the correct version. If you don’t really need to use Filemaker 6, maybe you could compress the app so it is not recognized also? Just a couple of thoughts.

PreTech

P.S. Here is a snippet of code I used in my Ill CS script that may or may not be of use to you.

set Ill to (path to applications folder as Unicode text) & "Adobe Illustrator CS:Illustrator CS.app"
set oldIll to "MacIntosh HD G52:Applications (Mac OS 9):Adobe Illustrator® 8.0:Adobe Illustrator® 8.0.1"
try
   tell application oldIll to quit
end try
using terms from application "Illustrator CS"
   tell application Ill
       activate
       
       set docRef to make new document with properties {color space:CMYK}
       make new rectangle in current document with properties {name:"sq1", position:{200, 400}, fill color:{class:CMYK color info, cyan:75, magenta:20, yellow:100, black:0}}
   end tell
end using terms from

PreTech, “u da best!” :smiley:

It seems to be working stand-alone and compiled into a FaceSpan application:


set fm6 to (path to applications folder as Unicode text) & "FileMaker Pro 6 Folder:FileMaker Pro.app"
set fm8 to (path to applications folder as Unicode text) & "FileMaker Pro 8:FileMaker Pro.app"

try
	tell application fm6 to quit
end try

using terms from application "FileMaker Pro"
	tell application fm8
		activate
	end tell
end using terms from

Thanks man, now just one more puzzle to solve on this project:

Scripting Lotus Notes

[EDIT: Corrected some typos…it’s still early…:rolleyes:]

Kevin,

Glad I could help you on the first part.:wink: Unfortunately, I know nothing about Lotus Notes. Is that some sort of marker from a Chinese mafia?

PreTech