You can set your script to enter find mode and set the value of the field you want to search within to [X...Y] with X and Y being your two outer points.
Another way is to divide the search into two search records (not really needed), the first finding >X and the next omitting <Y
Do you get the input from a dialog or from fields (global fields?) filled in by the user?
If this is the case, consider validating those for being or not being logical. Also set error capture to "on" and do handling of errors (like no found records) yourself to avoid leaving the user in the dark.
Does this help?
# calculate $yourMin and $yourMax, might be script paramters
Enter Find Mode [ Pause: Off ]
Insert Calculated Result [ Select ; YourTable::YourField ; $yourMin & "..." & $yourMax ]
Perform Find 
Thank you both,
it worked like a charm