"under the hood" info:
All layouts that refer to the same table occurrence (a table occurrence is a "box" used to define relationships in Manage | Database | Relationships ) in Layout setup.... | Show Records from, will share the same found set, sort order and current record within a given filemaker window.
This gives you two options:
1) Select a table occurrence and click the duplicate button (two green plus signs) to make a new occurrence for the same table. Create a layout based on this new occurrence. Have your script perform it's finds, sorts etc on this layout and the found set changes will not affect what you see on your other layouts so long as they do not refer to the same table occurrence. This may require duplicating additional table occurrences and linking them in relationships identical to the current layout were you perform this find if you need references to related data.
2) Open a new window (this can be a hidden window) and perform the find in it. This can create windows resize issues if your database is open on a windows system and has windows maximized--which is why I usually use option 1, but it avoids the extra design work needed to create that duplicate occurrence and possibly additional relationships. You must also be careful not to trip over "edit locks" if you have a record open for editing in window 1, any attempts to modify the data in that record in window 2 will not work and you'll get an error message that the record is locked. This can usually be avoided by commiting records in Window 1 before opening window 2.
You can also set a global variable when script runs then have your layout triggers look for this variable and only run if it's value is 1.
Yep, Use that method frequently.