Fiz um exemplo pois quis desenferruja meu Basic. Veja o exemplo bobão
logo abaixo:
[]s
sub Main
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Text"
args1(0).Value = "ola"
for i = 1 to 5
dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args1())
next i
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertPara", "", 0, Array())
end sub
Gilvan Vilarim escreveu:
Nao mexo muito com as macros do OO, mas se a sintaxe eh Basic faça assim:
for i = 1 to 5
<comandos a repetir>
next i
Acho que nem precisa declarar o I antes de usar.
[]s
Robert Cantarutti escreveu:
Erro:
Ele não aceita o "for" fora da surotina...
On 12/28/05, Marco <[EMAIL PROTECTED]> wrote:
FOR I = 5
[subRotina]
[incremento]
NEXT
--
Marco de Freitas,
NBR para a Internet já! Porque meu navegador não é penico.
http://www.abrasol.org/modules.php?name=News&file=article&sid=199
http://www.w3.org/2003/03/Translations/byLanguage?language=pt-br
http://www.petitiononline.com/we6k7496/petition.html
http://www.dicas-l.unicamp.br/dicas-l/browsers.php
Robert Cantarutti escreveu:
Usando este teu exemplo e se quiser repetir 5 vezes como fica?
FOR 5
[subrotina]
NEXT
é isso?
On 12/28/05, Marco <[EMAIL PROTECTED]> wrote:
FOR [variável]
[subrotina]
NEXT
--
Marco de Freitas,
NBR para a Internet já! Porque meu navegador não é penico.
http://www.abrasol.org/modules.php?name=News&file=article&sid=199
http://www.w3.org/2003/03/Translations/byLanguage?language=pt-br
http://www.petitiononline.com/we6k7496/petition.html
http://www.dicas-l.unicamp.br/dicas-l/browsers.php
Robert Cantarutti escreveu:
Gostaria de saber mais sobre Macros. Alguém tem link de apostilas em
português sobre isso?
Ou se alguém sabe programar no Basic do openoffice: como faço um
loop???
--
Sig.:
Robert C. M. Cantarutti Jr .:
skype/vono: bobcantarutti
#vono: +55 41 4063-9129
google talk: [EMAIL PROTECTED]
*´¨)
¸.·´¸.·*´¨) ¸.·*¨) ¸.·*¨)¸.·*´¨) .·*´¨)
(¸.·´ (¸.·` **Boas Festas ** (¸.·´ (¸.·`*´¨)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Sig.:
Robert C. M. Cantarutti Jr .:
skype/vono: bobcantarutti
#vono: +55 41 4063-9129
google talk: [EMAIL PROTECTED]
*´¨)
¸.·´¸.·*´¨) ¸.·*¨) ¸.·*¨)¸.·*´¨) .·*´¨)
(¸.·´ (¸.·` **Boas Festas ** (¸.·´ (¸.·`*´¨)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Sig.:
Robert C. M. Cantarutti Jr .:
skype/vono: bobcantarutti
#vono: +55 41 4063-9129
google talk: [EMAIL PROTECTED]
*´¨)
¸.·´¸.·*´¨) ¸.·*¨) ¸.·*¨)¸.·*´¨) .·*´¨)
(¸.·´ (¸.·` **Boas Festas ** (¸.·´ (¸.·`*´¨)
--
Gilvan Vilarim ====================
gilvan.vilarim (Arroba) terra.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]