Hi,

The snippet below does brings up the Save As dialog and return
the filename. I have a problem with some of the parameters
as commented.

Also get this error appear as dialog closes:
Use of uninitialized value at C:/perl/site/lib/Win32/FileOp.pm line 986,
<STDIN> chunk 96.

Anybody see what I'm doing wrong?


(lc($^O) =~ "mswin") && do 
        {
        $jobPath = "c:/path/to/default/";

        my $filterParams;
        if(lc($cmdStr) =~ "pdf")
                {
                $filterParams = "All Files (*.*)\0 *.*\0PostScript files
(*.ps)\0*.ps\0Acrobat files(*.pdf)\0*.pdf";
                $defaultFileExtension = "pdf";
                }
        else
                {
                $filterParams = "All Files (*.*)\0 *.*\0Acrobat files
(*.pdf)\0*.pdf\0PostScript files (*.ps)\0*.ps";
                $defaultFileExtension = "ps";
                }

        $ret = SaveAsDialog(filters => $filterParams, #this works
                extension => $defaultFileExtension,     # $ret does not get this added
                dir => $jobPath,        # has no effect (this path exists and can cd 
to it)
                defaultfilter => 3,     # this works
                );
        return $ret;
        };

Reply via email to