This is not a problem that occurs with more recent versions of Filemaker.
Here's a likely scenario.
Someone clicks the button and filemaker can't find the referenced file. Maybe a shared directory isn't mapped to that user's computer correctly, an enclosing folder was renamed or the file itself was renamed and/or moved. Whatever the specific cause, when this happens in 5.5 and older versions, filemaker tells you it can't find the file and opens a dialog for you to find the file. If the user then finds the file in it's different location/differently mapped network drive/etc this new path is stored in place of the original and this will change the file reference you see in your script step.
You'll need to investigate and figure out the exact situation that's keeping filemaker from finding the file in the first place and fix the issue.
You could also upgrade to a newer version of filemaker where you'll have many new features--including much better and explicit control of all external file references--something we were repeatedly requesting from filemaker back in the v3, v4 and v5 days.
I agree...there's a communication error somewhere...when the open script step is called, somewhere along the line the path is referring to the wrong file, and it's returning that file instead and saving it for next time.
My IT guy's words were "that's so weird. And not an error with a path at all, but a script randomly deciding to link back to it's own fp5 file. Hmm." And I told him bull**bleep** (not in those words). :) It's got to be a connection/communication issue. Programs don't just randomly do anything.
I really, really would love to upgrade. My company bought a super-expensive all-inclusive database program called BatchMaster, so they refuse to upgrade FileMaker because "[Filemaker] is going away soon. You'll be integrated into BatchMaster very soon." And that's where we have been for the last 5 years.
Thanks for your help.
PS - Would you believe I'm just the Lead Graphic Designer and supervisor of the graphics department who also happens to be in charge of the Print Management System database because the IT guy doesn't know any programming language, or database mgmt, or understand FileMaker? I'm the only one who bothered to figure it out so that it would work better for us. I have a CS degree and am fluent in multiple programming languages, however, so that helps. :)
</end rant> heheh
I'm not sure you got my point. This script could update its file reference anytime a user triggers the script and filemaker is unable to fid the referenced file. It's the result of a User's uninformed actions in response to a "can't find this file" error message.