Scripting and passing parameters

The following script runs ok without a date range, but when I want to add a date range, toad does not ask for them when running and the result CSV file is blank.

When I run my sql in toad directly it stops and ask to input the 2 prompts, but does not when calling toad from command line. How can I do this?

using Toad 8.6.1.0

FORMAT=DELIMOTHER
DELIMCHAR=,
QUOTES=YES
COLUMNS=YES
LOWERCASECOLUMNS=NO
OUTPUTDIR=c:
BEGINQRY c:\fitt\export.csv
SELECT * FROM IND_MAINTENANCES
where pre_maint_created_date between :fromdate and :todate
ENDQRY
CLOSETOAD

Guy

Thanks