I am sorry you are having trouble understanding the Maestro Scripting Language. The scripting language is a stack-based language and is very similar to FORTH. You might try searching for more in-depth documentation on FORTH to get a better understanding of the process flow of the Maestro scripting language. You could also try loading an example script and using the "Step Script" button in the "Script" tab of the Maestro Control Center to step through the script line by line and see how the values on the stack change after each command execution.
To help you get started on your script, I recommend that you take a look at the "Using multiple buttons or switches to control servos" example script and try to understand how it works. That example script can be found under the "Example Scripts" section in the Maestro User's Guide. You can use an IF/ELSE statement to move your servo to the associated position after checking your sensor's status. Like so:
# check if sensor is detecting anything
# move servo to 1728 us
# delay 2500 ms
# move servo to 1280 us
By the way, I noticed you referred to your position values in milliseconds. I think you meant to type microseconds. Typically, standard RC hobby signals are between 1000 and 2000 microseconds.
If you try writing your script and are having trouble getting it to work, you can post your code here, and I would be happy to take a look.