Interestingly, I think it is not possible. There's a GetGraphicalVariable function to get the values of them, but no way to change them from inside scripts! I don't know why this is! Anyway, you'll have to use a GlobalInt instead, I'm afraid. Maybe there should be a warning on those variables, like "Cannot be accessed from script" or maybe just a SetGraphicalVariable function added...