optical switch that can read 2 different distance's???

hi guys so at the moment i have a Device that pushes a slider that will press one switch then disengages then carries on to press another. what im looking for is a optical switch that can read one distance for sample 6mm, and turn on the first switch then if it goes say 5mm the switch will turn off. how ever if the switch is say 2mm it will turn on the other switch

Perhaps you should explain what you think you need this device for, its highly unlikely to exist
in the form you describe, there's likely a better approach.

Interesting problem. You can use interrupter modules at each trip point. If you use a pot you can monitor the position with an A/D. There are several other ways of doing this. Try a different approach maybe. Make a flow chart with specifications.

hey so what the problem is, its for and airsoft gun "toy", it has a 2 stage trigger that on half pull it dose 1 shot, or one rotation of the motor, and when it hits half pull it will disconnect the first stage of the trigger, the 2nd part of the trigger is pulled all the way back to be held "on" the problem is that the first stage of the trigger is not that reliable, so i was thinking i could put a optical sensor there in its place, if tried to take some pics. to show how it works. another problem is that i cant be to big. now i do have some 3d modeling skills and a 3d printer, iv re designed the trigger box with switches and the same sort of disconnect, but i just cant get it to work right,


So why not use an analog distance sensor and do all the decisions in software? Perhaps a small slider pot
could be used, or a short linkage to a standard pot?

well i did find this:


im not sure if that would work or not?

That’s a presence sensor. Not giving any distance information.