I have an Automator Application that I would like to ask the user to enter a time of the user's choosing.
Ideally, I would like the dialog box to have three fields:
1) Hour field
2) Minutes field
3) Period (p.m. or a.m.)
Fields one and two are enterable by the user and there is a colon in between the two fields. Field three is a simple drop-down list and the user must select one of the two options.
I would also like the AppleScript to check that whatever text is typed in the hour and minutes fields comports to the standards of time, and if it does not, then an error message is presented and the user must enter the text again. (I.e., the text entered in the first field must be a single-digit number between 1 and 12 and the text entered in the second field must be a two-digit number between 00 and 60.)
I know that all of this can be accomplished in three separate dialog boxes, but I really would prefer to have it all completed in one dialog box (for the sake of presenting the user with a convenient UI).
I am not very proficient in AppleScript, so this project is extremely ambitious for me. Can this be accomplished in AppleScript?
If this behavior is not possible AppleScript, can someone recommend a similar alternative language in which this kind of dialog box is possible?