kennedy Posted October 30, 2002 Posted October 30, 2002 I wish all functions could take computed text arguments like GetField does. Is there anyway to be able to *compute* or *lookup* the name of a layout to go to? Is there anyway to be able to *compute* or *lookup* the name of a script to perform? Is there anyway to be able to *compute* or *lookup* the name of an external file in which to perform a script? For example, for each file I add to my system, I must add a new Preview layout to my floating Preview panel file and 8 new scripts. The layouts are identical except they call the corresponding scripts. The scripts are identical, except they reference the corresponding layout and the corresponding external file. And this duplication and renaming is all the more annoying due to the lack of cut n paste. But that'll be nothing compared to the hell when I find a bug in the Preview scripts and have to change it in 20 identical spots. I'm pretty sure the answer is "no, you have to do it the hard way", but thought I'd check. There's definitely some things about FMP that are NOT good!
LiveOak Posted October 30, 2002 Posted October 30, 2002 1) You can go to a layout by number or you can create a looping script that goes to the next layout and tests Status(CurrentLayoutName) against a global field setting then exits. 2) No. With just FM, you must do a series of tests: If(Condition1) Perform Script(Script1) End If If (Condition2) Perform Script(Script2) End If ... 3) Same as 2). -bd
CobaltSky Posted October 30, 2002 Posted October 30, 2002 Here is a formula which will 'compute' layout number from layout name: PatternCount(Middle(LayoutNames(Status(CurrentFileName)), 1, Position(LayoutNames(Status(CurrentFileName)), gLayoutName, 1, 1)), "
kennedy Posted October 30, 2002 Author Posted October 30, 2002 Hmmm... ugly as that is, #2 is actually far better than the layout and script duplication I had embarked upon. Thanks!
Recommended Posts
This topic is 8064 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 accountSign in
Already have an account? Sign in here.
Sign In Now