Please execute this AppleScript:
tell application "Flux"
launch
activate
delay 3
tell application "System Events"
activate
set theTime to text returned of (display dialog "How long should F.lux remain activated?" with title "F.lux app" default answer "" buttons {"Cancel", "Start"} default button 2)
delay theTime * 60
tell application "Flux" to quit
end tell
end tell
Test it with 1 = 1 minute.
Since I got problems with my palettes when executing such a time-based macro, I converted the AppleScript into an app.