Replace any hard-coded references to a partition in your scripts with this piece of code:
objFramework.Partition
You can enter the code Scripting Pop-up Menu: choose Current Framework and then partition.