Executa comandos do terminal a partir da programação básica do LibreOffice?

3

Existe uma maneira de executar comandos do sistema em macros do LibreOffice Basic para que as macros possam fazer coisas fora do LibreOffice (por exemplo, alterar o layout do teclado)?

    
por user69453 03.07.2014 / 14:05

1 resposta

2

Sim, existe. Certa vez, fiz uma pergunta semelhante na SU.

A resposta direcionou-me para a função Shell

Uso básico (do link da função Shell ):

Shell(Pathname, Windowstyle, Param, bSync)

Pathname

the path of the program to be executed.

Windowstyle

the window in which the program is started. The following values are possible:

0 - The program receives the focus and is started in a concealed window.
1 - The program receives the focus and is started in a normal-sized window.
2 - The program receives the focus and is started in a minimized window.
3 - The program receives the focus and is started in a maximized window.
4 - The program is started in a normal-sized window, without receiving the focus.
6 - The program is started in a minimized window, the focus remains in the current window.
10 - The program is started in full screen mode.

Param

command line parameters to be transferred to the program to be started.

bSync

wait for shell command to finish flag
true - wait for shell command to finish
false - don't wait for shell command to finish

    
por 03.07.2014 / 15:37