| View previous topic :: View next topic |
| Author |
Message |
Momo Newbie

Joined: 22 Oct 2005 Posts: 3
|
Posted: Sat Oct 22, 2005 1:51 am Post subject: AltKeyHandler Macro in OOo 2.0.0 |
|
|
Hi,
I am a first time installer of OpenOffice. With version 2.0.0 coming out just recently I thought I'd give it a try. One thing that I am really missing in Writer is that I cannot asign paragraph styles to the ALT-key like in Word.
I read about a Macro by Iaanz called AltKeyHandler (http://homepages.paradise.net.nz/hillview/OOo/) that would offer that functionality.
My problem now is that I cannot get this script to work with OpenOffice.org 2.0.0. Could there be an incompatibility problem with v2 so that it can only be used with versions 1.x. Or did someone get it to work with the new OOo 2.0 and I'm just doing something wrong?
Perhaps I should also mention that I am using the German version of OOo - no idea if this makes any difference.
The error message I get when creating a new text document after having AltKeyHandler globally assigned to OOo-Documents says somethig like the following:
"A scripting framework error occured while executing the basic script. vnd.sun.star.script:AltKeyHandler..AltKeyHandler.SetupAltKeyHandler?language=Basic&location=document.
Message: BasicProviderImpl::getScript: no sript!"
I'd highly appreciate any help on this topic!
Thanks in advance
Momo |
|
| Back to top |
|
 |
Momo Newbie

Joined: 22 Oct 2005 Posts: 3
|
Posted: Sat Oct 22, 2005 3:26 am Post subject: AltKeyHandler up and running with OOo 2.0.0 |
|
|
Hi,
for those interested. The AltKeyHandler-Macro is working with OOo 2.0.0. It is great and will make my transition from MS Word to OOo a lot easier. Thanx for that wonderful script!
Momo |
|
| Back to top |
|
 |
Leguar Newbie

Joined: 28 Oct 2005 Posts: 2
|
Posted: Fri Oct 28, 2005 2:30 pm Post subject: |
|
|
Momo,
You seem to have solved your problem of "scripting framework error". I get the same message when I try to use launch two macros from a button on a toolbar:
- a macro downloaded also from Iannz OpenOffice.org page.
- a small macro that I have created to convert the tables to text.
I think that my problem comes from the fact that I did not install properly the macros, but I don't know how to do (I am also a newbie, trying to replace Office XP with OO).
Please, tell me how you solved your problem.
Thank you in advance.
. |
|
| Back to top |
|
 |
Momo Newbie

Joined: 22 Oct 2005 Posts: 3
|
Posted: Tue Nov 01, 2005 10:28 am Post subject: |
|
|
Hi Leguar,
have a look at Iaanz's homepage. He posted two installation instructions on how to install the AltKeyHandler macro under OOo 2.0. One is in German with screenshots, the other is in English.
Hope this will help you to solve your problem.
Momo |
|
| Back to top |
|
 |
Leguar Newbie

Joined: 28 Oct 2005 Posts: 2
|
Posted: Thu Nov 03, 2005 2:54 pm Post subject: |
|
|
Momo,
Thank you for your help. |
|
| Back to top |
|
 |
fserieys Newbie

Joined: 09 Nov 2005 Posts: 2
|
Posted: Wed Nov 09, 2005 3:12 am Post subject: |
|
|
Hello,
I got exactly the same probem as Momo and Leguar after creating a macro.
The error message appeared each time I opened a file and It was impossible to make it desappear even after I deleted the responsible macro .
So, I decided to completely uninstall OOo V2.0, to delete all the remaining files and to make a new installation. Stupefaction : the same error massage with reference to the name of the initial macro (deleted 3 days before) appears again when I open a OOo file
Has someboby an idea about how get rid of this hyperresistant error message ?
Francis
Thank you for your help |
|
| Back to top |
|
 |
Iannz OOo Advocate

Joined: 14 Feb 2004 Posts: 494 Location: Christchurch, New Zealand
|
Posted: Thu Nov 10, 2005 6:05 pm Post subject: |
|
|
Hi Francis,
| fserieys wrote: | | I got exactly the same probem as Momo and Leguar after creating a macro. |
Could you quote the extact error message and I may be able to help. _________________ Cheers, Ian
http://wiki.services.openoffice.org/wiki/Extensions_development_basic a wiki about writing OpenOffice.org extensions. |
|
| Back to top |
|
 |
revnomad OOo Advocate


Joined: 23 Feb 2003 Posts: 211 Location: NE Nebraska
|
Posted: Thu Nov 10, 2005 9:04 pm Post subject: AltKeyHandler |
|
|
I had almost forgotten about this gem. How do you get it to work in OO2? I've tried the instructions but nothing happens.
NTP |
|
| Back to top |
|
 |
Iannz OOo Advocate

Joined: 14 Feb 2004 Posts: 494 Location: Christchurch, New Zealand
|
Posted: Thu Nov 10, 2005 11:56 pm Post subject: Re: AltKeyHandler |
|
|
| revnomad wrote: | I had almost forgotten about this gem. How do you get it to work in OO2? I've tried the instructions but nothing happens.
NTP |
If you have followed the instructions, then when a document is created or opened a Setup routine is run that inetercepts key presses. If the key press corresponds to a "known" sequence then the action is run. E.g. By default Alt+A should diplay the dialog for changing Alt+key shortcuts. _________________ Cheers, Ian
http://wiki.services.openoffice.org/wiki/Extensions_development_basic a wiki about writing OpenOffice.org extensions. |
|
| Back to top |
|
 |
revnomad OOo Advocate


Joined: 23 Feb 2003 Posts: 211 Location: NE Nebraska
|
Posted: Fri Nov 11, 2005 5:36 am Post subject: behaving badly |
|
|
Something is behaving badly Alt-A brings up the Table menu!??????
When I have time I'm going to remove AltKeyHandler and start over with it.
NTP |
|
| Back to top |
|
 |
Bhikkhu Pesala Super User


Joined: 23 Aug 2005 Posts: 2324 Location: Seven Kings, London, UK
|
Posted: Fri Nov 11, 2005 8:37 am Post subject: |
|
|
I finally got the AltKeyHandler working.
- After installing macros, one needs to run the SetupAltKeyHandler macro.
- Then one can press Alter A to assign different commands to shortcuts.
- I assigned the HexUnicode macro to Alt X, so Alt X now brings up a dialog into which one enters the Hex code.
- I also customized my menu to add a Macros menu to make it easier to work with the AltKey Macros.
_________________ Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP |
|
| Back to top |
|
 |
karelc General User

Joined: 07 Jul 2006 Posts: 13 Location: Spain
|
Posted: Sat Jul 08, 2006 8:15 am Post subject: |
|
|
I'm having difficulty getting AltKeyHandler to work when I assign macros to it in OpenOffice v. 2.0 (Spanish version) running with Windows XP SP2.
AltKeyHandler works correctly when I assign text (for example, inserting my name, or an ellipsis sign). Or when I assign a command (e.g., DelToEndOfLine). Or when I assign a style command selected from the list of commands that appears in the dialogue box (for example, Encabezado 1, which is the Spanish for Header 1). But nothing happens when I press Alt key combinations which I've assigned to simple macros that I've recorded myself (e.g., changing the order of two letters in a word, or setting the background colour to yellow), or to macros which come with OpenOffice (e.g., Gimmicks.ReadDir).
Both types of macro (my recorded ones and the preinstalled ones) work correctly if I run them from the Tools menu (I assume that's what it's called in English), in Tools, Run Macro. And they also work if I assign them to Control key combinations, via Tools, Customize, Keyboard.
Curiously, AltKeyHandler doesn't show all the macros which I see when I enter the Tools menu and choose Run Macro. Macros which are present (i.e., they come pre-installed with OpenOffice) but don't show up include Hello World, Capitalise, Export, Highlight, Memory Usage and Schedule. Is there something hiding these macros from AltKeyHandler?
Of the functions that come built into AltKeyHandler, some respond to their pre-assigned Alt key combinations and some don't. The functions for indents, hanging indents and setting and finding a temporary bookmark respond to their Alt key combinations and work correctly for me. The functions for headings, subtitle, title and watermark don't respond to their pre-assigned Alt key combinations. But, as I indicated above, it seems that the commands will work if I reassign them by selecting the equivalent Spanish name in the list of Style commands.
That leaves me with the problem of still not being able to get my macros to run in response to Alt key combinations. I'd be grateful for any suggestions. |
|
| Back to top |
|
 |
Bhikkhu Pesala Super User


Joined: 23 Aug 2005 Posts: 2324 Location: Seven Kings, London, UK
|
Posted: Sat Jul 08, 2006 10:12 am Post subject: |
|
|
If you haven't already done so, you ccould vote for this Issue to get it fixed.
You and many other users could spend a lot of time trying to get the Alt-key macros to work properly when it should really be a built-in function. Ian obviously spent a good deal of time writing the macros in the first place.
You could also try a third party macro recorder like Perfect Keyboard Pro which has the advantage of working across applications — not only in Open Office.
“Hello World” assigned to Alter 0 key.
“Hello World” assigned to Alter 0 key.
“Hello World” assigned to Alter 0 key. _________________ Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP |
|
| Back to top |
|
 |
Iannz OOo Advocate

Joined: 14 Feb 2004 Posts: 494 Location: Christchurch, New Zealand
|
Posted: Sun Jul 09, 2006 2:39 pm Post subject: |
|
|
| karelc wrote: | | But nothing happens when I press Alt key combinations which I've assigned to simple macros that I've recorded myself (e.g., changing the order of two letters in a word, or setting the background colour to yellow), or to macros which come with OpenOffice (e.g., Gimmicks.ReadDir). |
I may be wrong but are you actually assigning the macro and not just the library that the macro resides in. E.g. Gimmicks.ReadDir.Main
| karelc wrote: | | Curiously, AltKeyHandler doesn't show all the macros which I see when I enter the Tools menu and choose Run Macro. Macros which are present (i.e., they come pre-installed with OpenOffice) but don't show up include Hello World, Capitalise, Export, Highlight, Memory Usage and Schedule. Is there something hiding these macros from AltKeyHandler? |
The macro was originally written for OOo1.1.x which didn't have support for scripts other than BASIC. The macros that don't show up in the list are those written in other scripts (Python,Bash etc). The reason for this is that the macro searches the text of the BASIC modules to find the names of the subroutines and functions.
| karelc wrote: | | Of the functions that come built into AltKeyHandler, some respond to their pre-assigned Alt key combinations and some don't. The functions for indents, hanging indents and setting and finding a temporary bookmark respond to their Alt key combinations and work correctly for me. The functions for headings, subtitle, title and watermark don't respond to their pre-assigned Alt key combinations. But, as I indicated above, it seems that the commands will work if I reassign them by selecting the equivalent Spanish name in the list of Style commands. |
Being barely monolingual I have no experience with OOo in other languages. I was aware that there are differences between the internal names of styles and displayed names. For simplicity of coding and for users I decided to stick with the displayed names - unfortunately as you have discovered these are different for different languages.
| karelc wrote: | | That leaves me with the problem of still not being able to get my macros to run in response to Alt key combinations. I'd be grateful for any suggestions. |
If your are assigning the library.module.macro and the macro you recorded or create works from the tools > macros > run then I am not sure what is going wrong for you. _________________ Cheers, Ian
http://wiki.services.openoffice.org/wiki/Extensions_development_basic a wiki about writing OpenOffice.org extensions. |
|
| Back to top |
|
 |
hholler Newbie

Joined: 29 Aug 2006 Posts: 1
|
Posted: Tue Aug 29, 2006 4:03 am Post subject: Problem with templates |
|
|
Hi all,
I got the macro to work with the explanations on Ian's website (http://homepages.paradise.net.nz/hillview/OOo/). I also got them to start everytime I create a new document or open an existing one.
Except when I'm using templates. I have created my own templates with special formatting for documents I write regularly (memos), so they have a standard header with typical information. But other than with an empty new document, when trying to create a document from one of the templates, I always get the error message
com.sun.star.uno.RuntimeExceptionScriptProtocolHandler::createScriptProvider(),
The macro does not work within these documents and will not even run if I call it from the menu by hand (the error message here is: com.sun.star.uno.RuntimeException). These error messages leave me in the dark about what to change in my setup. Does anyone have an idea?
It would be really helpfull if the macro ran in template created docs as well and not just in plain simple empty ones.
Thanks for your efforts.
cheers, Helge |
|
| Back to top |
|
 |
|