Update Home

Mauricio Baeza 2019-11-22 03:36:05 +00:00
parent db6f1d3069
commit c4a43265a8
1 changed files with 32 additions and 0 deletions

32
Home.md

@ -35,6 +35,38 @@ Barcodes provided
## By code
* Python
```
import uno
CTX = uno.getComponentContext()
SM = CTX.getServiceManager()
def create_instance(name, with_context=False):
if with_context:
instance = SM.createInstanceWithContext(name, CTX)
else:
instance = SM.createInstance(name)
return instance
def main():
from com.sun.star.beans import NamedValue
zaz = create_instance("net.elmau.zaz.BarCode")
args = (
NamedValue('Type', 'qrcode'),
NamedValue('Data', 'libreoffice.org'),
)
path = zaz.execute(args)
print(path)
return
```
* Basic
```vb
Sub Main()