2011/8/14 Johnny Rosenberg <[email protected]>:
> 2011/8/14 Johnny Rosenberg <[email protected]>:
>> 2011/8/14 Oliver Brinzing <[email protected]>:
>>> 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…
>>>
>>> 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
>>>
>>> sLib = "Standard"
>>> oLibs = GlobalScope.BasicLibraries
>>> If Not oLibs.hasByName(sLib) Then
>>> MsgBox "Error reading " & sLib
>>> EndIf
>>>
>>> oLib = oLibs.getByName(sLib)
>>>
>>> mTmp() = oLib.getElementNames()
>>>
>>> For i = 0 To uBound(mTmp())
>>> s = s + mTmp(i) & Chr(13)
>>> Next i
>>> MsgBox s
>>>
>>> MsgBox oLib.getByName(mTmp(0))
>>>
>>> End Sub
>>
>> No, I didn't, but it seems to work for my global macros. I guess I
>> need to change the ”oLibs = GlobalScope.BasicLibraries” line for local
>> code (macros for the current document only), but to what?
>>
>>
>> Regards
>>
>> Johnny Rosenberg
>> ジョニー・ローゼンバーグ
>>
>>> Regards
>>> Oliver
>>
>
> Experimented a bit:
> Sub Main
> Dim A As String
>
> ' Getting code from the tab ”Spel” in the current document:
> A=ThisComponent.BasicLibraries.getByName("Standard").getByName("Spel")
> MsgBox A
> End Sub
>
> Thanks for your hint!
>
>
> Kind regards
>
> Johnny Rosenberg
> ジョニー・ローゼンバーグ
>
Also tried with Dialogues, but (in my case, as an example)
ThisComponent.DialogLibraries.getByName("Standard").getByName("Namndialog"),
which is a simple dialogue, seems to be an object of some kind and
it's not very obvious how to get the information I need from it (like
labels names of buttons and other objects, which macro they call and
so on). I guess I have to study it a bit closer, but all shortcuts
(like if someone would like to provide an example of some kind or
something) are welcome…
After having studied it only for maybe a minute or so, it seems like I
need to know what I'm looking for to look for it… But studying it more
might give me another impression of the whole thing, I don't know.
Kind regards
Johnny Rosenberg
ジョニー・ローゼンバーグ
--
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help