Do you mean that you wish to change the input voltage range of the scope automatically if an overvoltage is detected ?
If yes then you will need to be looking at the overflow value returned by ps2000_get_values, ps2000_get_times_and_values, ps2000_get_streaming_values, ps2000_get_streaming_values_no_aggregation, or my_get_overview_buffers, depending upon which mode you are using. If overflow is present then change to the next scale.
To work in the opposite direction you will need to look at the returned value and if the max/min returned are less than the full range of the next range then step down. You may have to tune the values so that you don't get a continuous up down switching of ranges.
Unfortunately we don't have an example of this in action, but if you post your vi we can take a look at your implementation if this would help.