Proximity Sensor controlling Stepper?

hi this is aravind.i got problem using proximity sensor&stepper motor.
my problem is

1.when sensor is high :

if push button is motor should trigger this i did .

2.whenever motor rotating .In front of proximity sensor we place. Sensor should high motor should stop

can give suggestions for second one

sketch_feb02b.ino (1.98 KB)