First of all 'polygamy' (the word used to indicate "multiple messenger instances") means that you can log in with two or more accounts at the same time. Where each account has its own Messenger program.
So, you can't log in with two or more accounts into the same Messenger program. You need multiple Messenger programs to be running.
Then, you can't log in with the same account into two or more Messenger programs at the same time. You do need different accounts.
All this said, scripts run on every Messenger program. And disabling them in Plus!'s preferences for one account but enabling them for the other is not a good thing todo, as this wont work properly.
However, what you can do is programming the script in such a way that it will only react on stuff if the logged in user is X (in your case the bot) and not anybody else.
For this you need to check
Messenger.MyEmail against the account email you whish the script to be '
running' with (it actually will run for the others too of course, but it wont do anything).
This check needs to be placed in each and every function your script has. Or you can use a global variable, etc...
in pseudo-code:
code:
// Make global variable
var bEnabled;
function OnEvent_SignIn(Email) {
// Set boolean value according to the signed in user
bEnabled = (Email === "mybot@mail.com")
}
function DoSomething {
// Only do something if the signed in user is our bot
if (bEnabled) {
var Something = 1 + 1;
Debug.Trace("I'm doing something ");
}
}
function DoSomethingElse {
// Only do something if the signed in user is our bot
if (bEnabled) {
var Something = 2 * 2;
Debug.Trace("I'm doing something else.");
}
}
Of course this is extremely simplyfied. In a big script you need to take in account many other things too, like the possebility that another user can sign in, that scripts start to run before a user has signed in and continues to run if a user signs out. (All extremely important to take in account when using timers for example)...