JRL wrote:Code: Select all
SRT>DoVerifyAndClose_Resolution
GetDialogProperty>Dialog1,DDB_Resolution,Text,varResolution_Check
If>{(%varResolution_Check%="480x270")OR(%varResolution_Check%="426x320")OR(%varResolution_Check%="640x360")OR(%varResolution_Check%="640x480")OR(%varResolution_Check%="800x450")OR(%varResolution_Check%="800x600")OR(%varResolution_Check%="1024x576")OR(%varResolution_Check%="1024x768")OR(%varResolution_Check%="720x408")OR(%varResolution_Check%="856x480")OR(%varResolution_Check%="960x720")OR(%varResolution_Check%="1280x720")}
Let>Validate=True
CloseDialog>Dialog1
Else
MessageModal>Please Select a Resolution
Endif
END>DoVerifyAndClose_Resolution
Thanks, JRL that worked. Is there some place in the help material or else where that explains the difference between the {} and () brackets and in what context they are used? I was trying to find some info on basic symbols and in what context they are used, but was having a hard time.
mtettmar wrote:If this is a combo box and you just want to make sure something - anything - has been selected, there's no need to do an OR check for every conceivable choice ... just check that ItemIndex is greater than -1. If ItemIndex is -1 then nothing is selected. 0 is the first item in the list, so if ItemIndex is greater than -1 the user has selected something:
GetDialogProperty>Dialog1,DDB_Resolution,ItemIndex,varItemIndex
If>varItemIndex>-1
...
...
Thanks, Marcus I didn't think of that. At first, I thought the command wouldn't work because "Must Select Device" is the default text before a device is chosen and is the only item in the drop-down. However, I have a check for selecting the device, so the resolution IF statement is not affected by that text. Also, once a device is selected the default text shows "Select a Resolution", but only the resolutions show in the drop-down when it's expanded. Therefore, the command worked as desired. Thank you.