If this is Filemaker 10 or 11, you may have script triggers that are performing the script. Take a look at what user actions take place just before clicking the button. Does this exit a specific field or portal? If so, an OnObjectExit trigger may be performing the script.
It's also possible that what looks like a script may in fact not be a script at all. Selecting a value and seeing related data appear in other fields, for example, does not necessarily require a script to accomplish. Likewise, conditional format expression can update to change the appearance of text, buttons and fields in your layout when a value in a field or variable is changed.