Sorry, I should have caught that you were using charIDToTypeID. It's a good bet if the string starts with a lowercase letter it is a stringID even if it is 4 chars.
I assume that the last code you posted works with CS2. If so you could change that runMenuItem to something like this so it will work with both char and string IDs.
function runMenuItem(item)
{
cTID = function(s)
{
return app.charIDToTypeID(s);
}
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putEnumerated( cTID( "Mn " ), cTID( "MnIt" ), item );
desc.putReference( cTID( "null" ), ref );
executeAction( cTID( "slct" ), desc, DialogModes.NO );
}
runMenuItem(stringIDToTypeID("snap"));