|
Post by tsh73 on Apr 10, 2019 18:00:50 GMT
Suppose I am adding SAVE functionality to my program. And I wish user to be able to name a file as he wants - FILEDIALOG, fine But I also want to provide some generated name, like list20190410_204221.txt so user just clicked OK and done with it.
Now, could I preset filename in FILDIALOG?
this works for me:
fname$="list20190410_204221.txt" FILEDIALOG "Save the file", fname$, fname$ if fname$="" then print "Cancelled by user" else print "selected fname$ >";fname$;"<" end if end
(this is not mentioned in a helpfile. And I had hard time finding it - happened just because mixing fName$ and fname$) Really, JB2 has "Compiler report" in Preferences - it would save me half a day.
|
|
|
Post by xxgeek on Apr 3, 2021 20:37:07 GMT
Hey, thanks for sharing this. I'm going to adopt it for use in the Program Organizer to pre-select the date for projects and files for users who may want the date appended.
fname$=date$() FILEDIALOG "Save the file", fname$, fname$ if fname$="" then print "Cancelled by user" else print "selected fname$ >";fname$;"<" end if end
|
|