Re: shellExecute PATH malfunction

new topic     » goto parent     » topic index » view thread      » older message » newer message

Antonio Alessi wrote:
> 
> 
> Date: Jun 8 16:34
> From: Tommy Carlier <tommy.carlier at pandora.be> 
> Subject: Re: shellExecute PATH malfunction  
> 
> 
> Just before calling shellExecute("open", ProgramDir & "\\about.exw",
> SW_NORMAL), try
> setting the current directory back to ProgramDir.
> 
> --
> tommy online: <a
> href="http://users.pandora.be/tommycarlier">http://users.pandora.be/tommycarlier</a>
> 
> Yes, it works :o))
> 
> Nice intuition, worthy of a credit in that about's acknowledgements.
> 
> The fact is that the Win32lib seems to load and save files according to its
> will: even
> after a 'chdir(myPath)' command, trying to save a file with the simple
> FILENAME.EXT
> will start with an unwanted directory, that has nothing to do with the
> 'myPath' above...
> It sometimes needs to be lucky o)  (fortune is a blind smile)

This is NOT win32lib doing anything. It is caused by Windows. To prevent
this default WINDOWS behaviour, you need to call getOpenFileName() with
an additional dialog flag. Here is an example...


   filename = getOpenFileName(
       TheWindow,                  -- parent window
       "",                         -- no default name
       { "Dialog Flags", {OFN_NOCHANGEDIR},
         "Text File", "*.TXT",     -- text files
         "All Files", "*.*" } )    -- everything else
-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu