(I intend this reply to be off list)
Thank you.
It has probably been more than 20 years since I studied any flavor of Basic and
I have not been able to find what dir("path/file.ext") or dir() are supposed to
do. That is why I said that the "while" loop appears to be suspect. My guess is
that the former returns "path/" while the latter returns an empty string. I
must be wrong since that would prevent the macro from accomplishing the desired
task. But, then again, I fail to see any result when I attempt to use this
macro. Maybe I need to do more than exit from LO before I start it again in
order to activate the Subroutine?
--
Jim
-----Original Message-----
From: "Andreas Säger" <[email protected]>
To: [email protected]
Sent: Sun, 31 May 2015 13:54
Subject: [libreoffice-users] Re: open files automatically (a Star Basic macro)
Am 31.05.2015 um 22:43 schrieb James E Lang:
> Hi Andreas,
>
> Your Star Basic macro looks very interesting. It is not super complex
> (initialization, a loop, and a super simple supporting function). Has anyone
> given it a test drive?
>
> As I read the macro, the while loop looks suspect. Isn't it testing the
> length of a directory name [ dir("path/file.ext") ] instead of a file name?
> And, won't it operate on no more than one entity? I thought the idea was to
> automatically open zero or more office document files when soffice starts
> running.
>
> It also could probably be made more robust by adding a supporting function
> that validates the file's extension. Just a thought.
>
File name extensions are meaningless. LibreOffice tries to open any file
regardless of its extension. Rename a file to .xyz and open with
LibreOffice.
My code should have an error handler for unsupported (possibly broken)
files so the loop can continue in case of any error. That's it.
--
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
--
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted