Fai la tua domanda

João Luís's profile - attività

2018-12-31 16:49:10 +0200 received badge  Entusiasta
2018-12-21 19:08:18 +0200 received badge  Insegnante (source)
2018-12-20 15:01:44 +0200 ha risposto a una domanda Sobre "Catálogo de objetos"

Bom dia, já tentou ir em Exibir e clicar em Catálogo de Objetos? Normalmente as alterações de Exibir (View) permanecem,

2018-12-17 19:41:28 +0200 received badge  Domanda gettonata (source)
2018-12-17 19:26:26 +0200 ha modificato una domanda [Solved] LO Basic setKeyEvent syntax, Command part

LO Basic setKeyEvent syntax, Command part Hello Everyone, I've read here about a method that used a string sCommand to r

2018-12-16 19:15:30 +0200 ha commentato una risposta Button Macro plus Shift or Ctrl Key

I tried aKeyEvent.Modifiers = 3 and the result was a Ctrl+Shift combination. For numbers, 5, 6 and 7, we have Alt+Shift,

2018-12-16 00:26:05 +0200 ha accettato una risposta [Solved] LO Basic setKeyEvent syntax, Command part

Hello Everyone, I've read here about a method that used a string sCommand to reach to a module, probably got with record macro button. Then I wrote the macro below, trying to assign the Save Command to Ctrl+S. After runnig the macro, I got an error "BASIC runtime error. Sub-procedure or function procedure not defined.", the setKeyEvent highlighted. Any Ideas?

Sub SaveKeyWriter
    sCommand = "vnd.sun.star.script:Standard.Module2.MainSave?language=Basic&location=document"
    oModuleCfgMgrSupplier = createUnoService("com.sun.star.ui.ModuleUIConfigurationManagerSupplier") 
    oModuleCfgMgr = oModuleCfgMgrSupplier.getUIConfigurationManager("com.sun.star.text.TextDocument") 

    oWriterAccelCfgmgr = oModuleCfgMgr.getShortCutManager() 


    Dim aKeyEvent as new com.sun.star.awt.KeyEvent 
    aKeyEvent.Modifiers = com.sun.star.awt.KeyModifier.MOD1 
    aKeyEvent.KeyCode   = com.sun.star.awt.Key.S 

    setKeyEvent(aKeyEvent,sCommand)
    msgbox  oWriterAccelCfgmgr.getCommandByKeyEvent(aKeyEvent)
End Sub

sub MainSave

    dim document   as object
    dim dispatcher as object

    document   = ThisComponent.CurrentController.Frame
    dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

    dispatcher.executeDispatch(document, ".uno:Save", "", 0, Array())
end sub
2018-12-16 00:26:05 +0200 received badge  Studioso (source)
2018-12-15 23:19:13 +0200 ha commentato una risposta [Solved] LO Basic setKeyEvent syntax, Command part

Yes!!! Doing that nailed it! Thanks! Also, do you know how to modify the HotKeys' list (tools->customize->keyboard

2018-12-15 19:42:31 +0200 ha posto una domanda [Solved] LO Basic setKeyEvent syntax, Command part

LO Basic setKeyEvent syntax, Command part Hello Everyone, I've read here about a method that used a string sCommand to r