1. getOpenFileName()
- Posted by don cole <doncole at pacb?l?.net> Jan 20, 2008
- 567 views
Hello All. VOID=getOpenFileName() Always open in folder "Documents". How can I change this? Don Cole
2. Re: getOpenFileName()
- Posted by Mike777 <anon4321 at gmail?com> Jan 21, 2008
- 540 views
don cole wrote: > > Hello All. > > VOID=getOpenFileName() > > Always open in folder "Documents". > > How can I change this? > > Don Cole If you are using Win32Lib, you can use SetCurrentDirectory(sequence path) If you aren't using Win32Lib, then you will need to wait for somebody who knows the particulars of invoking the function directly. Mike
3. Re: getOpenFileName()
- Posted by Greg Haberek <ghaberek at gmai?.co?> Jan 21, 2008
- 567 views
don cole wrote: > > VOID=getOpenFileName() > > Always open in folder "Documents". > > How can I change this? You can pass a path to "file" parameter of the function:
VOID = getOpenFileName( 0, "C:\\WINDOWS\\system32\\", {"All Files", "*.*"} )
You *MUST* end the path in a backslash, else Windows will fill in the last part as the filename to choose. HTH, -Greg
4. Re: getOpenFileName()
- Posted by don cole <doncole at p?cbell?net> Jan 21, 2008
- 559 views
- Last edited Jan 22, 2008
Greg Haberek wrote: > > don cole wrote: > > > > VOID=getOpenFileName() > > > > Always open in folder "Documents". > > > > How can I change this? > > You can pass a path to "file" parameter of the function: > > }}} <eucode> > VOID = getOpenFileName( 0, "C:\\WINDOWS\\system32\\", {"All Files", "*.*"} ) > </eucode> {{{ > > You *MUST* end the path in a backslash, else Windows will fill in the last > part > as the filename to choose. > > HTH, > > -Greg Thanks Greg and Mike777, Now a new problem had popped up. Here's my code:
filename = getOpenFileName( MainWin, -- parent window "H:\\", -- no default name {"Dialog Flags", {OFN_ALLOWMULTISELECT}, "Rar Files", "*.RAR" , -- rar files "All Files", "*.*" } ) -- everything else
It open in H: which is what I want but now all files show up in the openDialog box not just the .rar files? With my old code:
filename=getOpenFileName(0,"", {"Dialog Flags", {OFN_ALLOWMULTISELECT}, "Rar Files", "*.RAR" , -- rar files "All Files", "*.*" } ) -- everything else
only the .rar files showed up. Don Cole
5. Re: getOpenFileName()
- Posted by CChris <christian.cuvier at agricult?r?.gouv.fr> Jan 22, 2008
- 544 views
don cole wrote: > > Greg Haberek wrote: > > > > don cole wrote: > > > > > > VOID=getOpenFileName() > > > > > > Always open in folder "Documents". > > > > > > How can I change this? > > > > You can pass a path to "file" parameter of the function: > > > > }}} <eucode> > > VOID = getOpenFileName( 0, "C:\\WINDOWS\\system32\\", {"All Files", "*.*"} ) > > </eucode> {{{ > > > > You *MUST* end the path in a backslash, else Windows will fill in the last > > part > > as the filename to choose. > > > > HTH, > > > > -Greg > > Thanks Greg and Mike777, > > Now a new problem had popped up. > Here's my code: > > }}} <eucode> > filename = getOpenFileName( > MainWin, -- parent window > "H:\\", -- no default name > {"Dialog Flags", {OFN_ALLOWMULTISELECT}, > "Rar Files", "*.RAR" , -- rar files > "All Files", "*.*" } ) -- everything else > </eucode> {{{ > It open in H: which is what I want but > now all files show up in the openDialog box not just the .rar files? > With my old code: > }}} <eucode> > filename=getOpenFileName(0,"", {"Dialog Flags", {OFN_ALLOWMULTISELECT}, > "Rar Files", "*.RAR" , -- rar files > "All Files", "*.*" } ) -- everything else > </eucode> {{{ > > only the .rar files showed up. > > Don Cole This has been a "simplification", hence a problem, to the user interface so that s/he has less parameters to care about. I don't know for how long it has been there, but probably from D. Cuny's days. v70.4 will have a getOpenFileNameEx() that will enable you to specify the initial directory without using the file name field, as it should have been done from day one. I cannot change the current behaviour as tons of code may rely on it, hence a new routine. I hope to ship out 70.4 for testing this weekend at the latest, for a release somewhere in february, bar gaping bugs showing up. CChris
6. Re: getOpenFileName()
- Posted by Pete Lomax <petelomax at blue?onde?.co.uk> Jan 22, 2008
- 546 views
don cole wrote: > Now a new problem had popped up. > }}} <eucode> > filename = getOpenFileName( > MainWin, > "H:\\", > {"Dialog Flags", {OFN_ALLOWMULTISELECT}, > "Rar Files", "*.RAR" , > "All Files", "*.*" } ) > </eucode> {{{ > It open in H: which is what I want but > now all files show up in the openDialog box not just the .rar files? > With my old code: > }}} <eucode> > filename=getOpenFileName(0,"", {"Dialog Flags", {OFN_ALLOWMULTISELECT}, > "Rar Files", "*.RAR" , > "All Files", "*.*" } ) > </eucode> {{{ > > only the .rar files showed up. Try this:
filename = getOpenFileName( MainWin, "H:\\.", {"Dialog Flags", {OFN_ALLOWMULTISELECT}, "Rar Files", "*.RAR" , "All Files", "*.*" } )
That extra little dot works a charm here (win98), dunno why tho. Regards, Pete
7. Re: getOpenFileName()
- Posted by don cole <doncole at p?cbe?l.net> Jan 23, 2008
- 539 views
Pete Lomax wrote: [snip] > Try this: > }}} <eucode> > filename = getOpenFileName( > MainWin, > "H:\\.", > {"Dialog Flags", {OFN_ALLOWMULTISELECT}, > "Rar Files", "*.RAR" , > "All Files", "*.*" } ) > </eucode> {{{ > That extra little dot works a charm here (win98), dunno why tho. > > Regards, > Pete Thanks Pete, I found by fooling around that
filename = getOpenFileName( MainWin, -- parent window "H:\\*.RAR", -- Location and first file in list {--"Dialog Flags", {OFN_ALLOWMULTISELECT}, "Rar Files", "*.RAR" , -- Rar files "All Files", "*.*" } ) -- everything else
works just like I want with winXP and I have no idea why. Don Cole
8. Re: getOpenFileName()
- Posted by Pete Lomax <petelomax at blueyo?der?co.uk> Jan 23, 2008
- 546 views
don cole wrote: > > Pete Lomax wrote: > > "H:\\.", > "H:\\*.RAR", Yup. Just so you know, with the latter you cannot do the "Euphoria files", (*.exw; *.ew; *.e; etc} thing. Admittedly "*.e*" is usually close enough in that case, whereas/however "." applies filters[1] properly, whatever it may be. Regards, Pete