Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8082 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Lacking cut'n'paste, I have been trying to figure out how to use Import script to its best advantage. Any tips and tricks would be greatly appreciated.

For example, I paid someone to add some error-checking code into my scripts. He emailed the modified file to me... I was making my own changes to that file as well, but not in the same scripts. Now what?

1) I can just look at his code and manually add it to mine. Since the error checking code was more than half the scripts, and there's no cut'n'paste, that seemed no good.

2) I can delete my script, import his, and rename his to what mine was named. Easy, but all the calls to that script will point to "unknown". I have to go find all the calls and change them to the new script by the same name. Ouch! (This includes external calls from other files, calls from buttons, and calls from other scripts.)

3) I tried doing #2 in a variety of sequences, hoping one of them would cause FileMaker to invoke the logic it has to use a script by the same name, rather than strictly using the script number. But nothing helped.

Is there any effective way to accomplish this? If not, this has got to be in the top 5 of worst things about FMP. It makes it a maintenance nightmare!

Posted

While there are some tricks to get script information OUT of FM, I know of no way to cut and paste or such. In the old, old days, one of my associates worked on a system in Frontier (QuicKeys like scripting) to import scripts, a pretty arcane approach. Your best bet is to apply some development methodology and don't modify a script someone else is working on or break it into subscripts.

As to #3, it might be worth some experiments. If you add some extra dummy scripts to the file for use when another person is developing AND don't add, delete, or change the order of scripts during development, import might hook up ok. I don't know the exact answer, but from casual observation of script behavior, it's worth a shot.

It's my belief that all these sorts of features will come to FM in time. My favorite is I want folders in Define Fields. wink.gif.

-bd

Posted

Hi Brian,

The lack of cut'n paste is, as you say, one of FMPs less attractive aspects, and it's to be hoped that as LiveOak says, it will be fixed sooner rather than later in an upcoming version. The ability to import scripts was only introduced with version 5.0 - and though hopelessly inadequate, it is nonetheless a big step forward, as I'm reminded every time I have to do scripting for one of several clients who are still struggling along with v4.1.

Anyway, to get to the point, it's likely that the best solution for your current predicament is to import copies of the scripts with the error checking code, delete everything else but the error check sequences, and then call them as sub-scripts from within your existing scripts. The original copies will be a point of reference as to what the total sequence and the logic is.

A serendipitous consequnce may be that opportunity may exist to re-use some of the error checking sequences for more than one existing script, in which case the 'modularity' which will result may pay off in a sense.

HTH! smile.gif

This topic is 8082 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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