04-19-2009, 10:57 PM
or like this.
Function Dialog3
Trigger 8
Function Dialog3
Trigger 8
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3"
str cb3 = "Rental House Income Jan 09[]Rental House Income Feb 09[]Rental House Income Mar 09[]Gas Charges Jan 09[]Gas Charges Feb 09[]Gas Charges Mar 09[]funds for year 2009 home[]funds for year 2009 office[]reports for sales of 2009[]reports for sale of 2008"
if(!ShowDialog("Dialog3" &Dialog3 &controls)) ret
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 153 73 "Dialog"
;1 Button 0x54030001 0x4 16 46 48 14 "OK"
;2 Button 0x54030000 0x4 94 46 48 14 "Cancel"
;3 ComboBox 0x54230243 0x0 0 14 152 213 ""
;END DIALOG
;DIALOG EDITOR: "" 0x203000C "" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case CBN_SELENDOK<<16|3
,str Dfile Dfolder
,Dfolder = "$desktop$\New Folder\" ;;Destination folder to search
,_i=CB_SelectedItem(lParam Dfile) ;;Gets selected items text
,if(dir(Dfolder.from(Dfolder Dfile ".txt"))) ;;Checks to see if file exsists
,,run Dfolder ;;opens if found
,else out "Not Found"
,case IDOK
,case IDCANCEL
ret 1