Re: How can I read my code in a module in the Basic IDE with Basic code?
Oliver Brinzing <[email protected]> Sun, 14 Aug 2011 09:55:53 +0200
| Newsgroups | gmane.comp.openoffice.devel.api |
|---|---|
| Message-ID | <[email protected]> |
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig24E5FAA222A4C94A2AD1B669 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Johnny, > If I only can read all the text in one module at once, that would do > it just fine. If there is a simple one-liner that reads just one > function or subroutine, that's a bonus, and if I can read a dialogue > that's even better=E2=80=A6 Have you tried: Sub Test() Dim oLibs as Object Dim oLib as Object Dim sLib as String Dim mTmp() Dim i as Integer Dim s as String =09 sLib =3D "Standard" oLibs =3D GlobalScope.BasicLibraries If Not oLibs.hasByName(sLib) Then MsgBox "Error reading " & sLib EndIf oLib =3D oLibs.getByName(sLib) =09 mTmp() =3D oLib.getElementNames() =09 For i =3D 0 To uBound(mTmp()) s =3D s + mTmp(i) & Chr(13) Next i=09 MsgBox s MsgBox oLib.getByName(mTmp(0)) =09 End Sub Regards Oliver --=20 GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 --------------enig24E5FAA222A4C94A2AD1B669 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5Hf48ACgkQTiyrQM/QSkWq+gCeIX/3SAY0D1ZtRAN3mkiSo71g RTIAnAzxmbkstnGeMDvt63N0X/Fz3zjf =wAaO -----END PGP SIGNATURE----- --------------enig24E5FAA222A4C94A2AD1B669--