How does one make GuiXT scripts database specific?

There are several ways to do this:

(1)

In your script, you can use
if Q[database=XXX]
...
endif

(2)

You can use &database in your script directory specification in GuiXT profile or guixt.ini, and then work with different script directories for different systems.

(3)

Or you can use the &database in the "SwitchTo" statement in guixt.ini to assign a completely different profile to different systems.