[Solved] Making "macros" with keyboard
[Solved] Making "macros" with keyboard
sorry, i may be using "macro" to mean the wrong thing.
1) i want to be able to hit keys (for example, alt+X) and have something like:
<hard return>
<hard return>
NAME:<space> <space>
appear on the page, like this:
QUESTION: < be ready to type here>
RAMONA: <type more here, etc>
in MS Word i know how to do this (using "create new macro") but OO doesn't work the same way.
2) i might need to disable some keystrokes to do it because i want to use alt+I and i find that brings up the insert menu in OO.
i know a good bit about Word but otherwise very dumb about computer stuff. thanks for any help!
1) i want to be able to hit keys (for example, alt+X) and have something like:
<hard return>
<hard return>
NAME:<space> <space>
appear on the page, like this:
QUESTION: < be ready to type here>
RAMONA: <type more here, etc>
in MS Word i know how to do this (using "create new macro") but OO doesn't work the same way.
2) i might need to disable some keystrokes to do it because i want to use alt+I and i find that brings up the insert menu in OO.
i know a good bit about Word but otherwise very dumb about computer stuff. thanks for any help!
Last edited by ramona on Thu Jan 24, 2008 7:36 pm, edited 1 time in total.
Re: making "macros" with keyboard
i'm sorry! using windows vista and OO 2.3.1 (just downloaded it a few days ago).
Re: making "macros" with keyboard
Tools -> Macros -> Record Macro.
Record the macro.
Click Stop recording to stop the recording. (Sorry.)
Save the macro with a well-chosen name. Remember in what folder you save it!
The next part is a pain.
Tools -> Customize -> Keyboard.
In the Category box scroll down to OpenOffice.org.macros and navigate to the folder with your new macro. Select the macro, select a keyboard shortcut in the top list (sorry, Alt+Key don't seem to be available) and click Modify. If a key was assigned to it that you don't want, select it and click Delete.
If this solves your problem, please edit the first post of this thread (Edit button) and add [Solved] to the subject line.
Record the macro.
Save the macro with a well-chosen name. Remember in what folder you save it!
The next part is a pain.
Tools -> Customize -> Keyboard.
In the Category box scroll down to OpenOffice.org.macros and navigate to the folder with your new macro. Select the macro, select a keyboard shortcut in the top list (sorry, Alt+Key don't seem to be available) and click Modify. If a key was assigned to it that you don't want, select it and click Delete.
If this solves your problem, please edit the first post of this thread (Edit button) and add [Solved] to the subject line.
LibreOffice 25.8.4.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Re: making "macros" with keyboard
The only problem is, I don't believe there's a way to get the beginning of the last line in all caps, the way the examples show. Someone else asked that question not long ago, too, but if I recall correctly, there is no simple solution.
Just thinking about it again, here, there might be a way to combine an autotext entry containing the formatted paragraph with a text field where NAME currently is, and a prompt that pops up containing a text box into which you'd type the name you want, to populate the field... if there's a way to force the text to all caps. You'd put all of that into a macro that inserts the autotext (or inserts the field, colon and spacing items), launches the prompt and populates the field. You'd run it with a custom tool or a key combination.
I haven't played with ways to create user prompts in OOo, though. It would require a script, and perhaps some way for the script to know which field is being populated once you have more than one on a page.
Someone in the Macros and API forum could whip up this whole thing pretty easily, I imagine, since the prompt is simple and the rest of the work is done by running the autotext shortcut. I'd really like to know how to do that prompt. (I checked the Code Snippets and the Macros and API forums already and didn't find any existing code, but that doesn't mean it's not there somewhere.)
Or, for an easier method to create but more complicated to use, you could make an autotext entry for each character's name, to have the name in all caps with the spacing and formatting you want. But you'd have to remember your autotext shortcut for each... and this doesn't easily handle the occasional extra character very well.
I strongly discourage the use of two blank paragraphs for spacing. Instead, edit the paragraph style that you'll be using (open the Stylist if it isn't already open, right-click on the paragraph style and choose Modify) and add the spacing in the Indents and Spacing tab, Above Paragraph. That way, if you ever need to tweak the spacing (maybe to improve pagination), you only have to make one change.
Just thinking about it again, here, there might be a way to combine an autotext entry containing the formatted paragraph with a text field where NAME currently is, and a prompt that pops up containing a text box into which you'd type the name you want, to populate the field... if there's a way to force the text to all caps. You'd put all of that into a macro that inserts the autotext (or inserts the field, colon and spacing items), launches the prompt and populates the field. You'd run it with a custom tool or a key combination.
I haven't played with ways to create user prompts in OOo, though. It would require a script, and perhaps some way for the script to know which field is being populated once you have more than one on a page.
Someone in the Macros and API forum could whip up this whole thing pretty easily, I imagine, since the prompt is simple and the rest of the work is done by running the autotext shortcut. I'd really like to know how to do that prompt. (I checked the Code Snippets and the Macros and API forums already and didn't find any existing code, but that doesn't mean it's not there somewhere.)
Or, for an easier method to create but more complicated to use, you could make an autotext entry for each character's name, to have the name in all caps with the spacing and formatting you want. But you'd have to remember your autotext shortcut for each... and this doesn't easily handle the occasional extra character very well.
I strongly discourage the use of two blank paragraphs for spacing. Instead, edit the paragraph style that you'll be using (open the Stylist if it isn't already open, right-click on the paragraph style and choose Modify) and add the spacing in the Indents and Spacing tab, Above Paragraph. That way, if you ever need to tweak the spacing (maybe to improve pagination), you only have to make one change.
Cheers!
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
Re: making "macros" with keyboard
I suppose ramona wants to write an interview like text, like:
When I want to achieve something like that I simply type the first two lines, select it, copy and paste it a dozen or so times. I'd enter the variable texts and, on finding that I don't have enough couples, I'd add a few more in the same way. A macro seems overdone for that kind of thing.QUESTION: Hi Ramona, how do you do?
RAMONA: Great. ...
QUESTION: ...
RAMONA: ...
QUESTION: ...
RAMONA: ...
LibreOffice 25.8.4.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Re: making "macros" with keyboard
Well, you could easily put that into an autotext entry too.floris v wrote:I suppose ramona wants to write an interview like text, like:
[clip]
When I want to achieve something like that I simply type the first two lines, select it, copy and paste it a dozen or so times.
A macro is overdoing it for that kind of thing, even if that kind of thing is done frequently.floris v wrote:A macro seems overdone for that kind of thing.
I thought it was for a play manuscript where there could be any number of names to capitalize, in which case finding a way to automate the required formating would be extremely useful. As noted, I had in mind an earlier conversation about a similar format. Evidently Word "learned" the format pattern and would reproduce it automatically, but Writer does no such thing. So, perhaps there is some need for a macro that does this... who knows?
Cheers!
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
Re: making "macros" with keyboard
yes, that's what i want to do but i'll be typing it WHILE i'm listening to the interview. a macro is not overdone, it's NECESSARY, when the document is 60-100+ pages & speed is important. cut/paste is too much work. i also often need multiple names.floris v wrote:I suppose ramona wants to write an interview like text, like:
When I want to achieve something like that I simply type the first two lines, select it, copy and paste it a dozen or so times. I'd enter the variable texts and, on finding that I don't have enough couples, I'd add a few more in the same way. A macro seems overdone for that kind of thing.QUESTION: Hi Ramona, how do you do?
RAMONA: Great. ...
QUESTION: ...
RAMONA: ...
QUESTION: ...
RAMONA: ...
floris v, your 1st suggestion didn't work. foxcole, i don't understand your 1st post at all. is autotext the same as autocorrect? i could do something like i0 --> QUESTION: but then i have to type 2 returns and i0 every time, that's annoying and slow.
this is actually quite simple to do in Word. i don't want to pay for Word! thank you for your suggestions so far, tho.
Re: making "macros" with keyboard
AutoText is different than AutoCorrect. With AutoText you create the AutoText entry and give it a shortcut of your choice. To use it you'd type the shortcut and hit F3.ramona wrote: foxcole, i don't understand your 1st post at all. is autotext the same as autocorrect?
You can put practically anything into an AutoText entry except an image... a formatted table, or a group of fields, or an entire form letter, for example.
To create the AutoText, type the content you want. Select it (highlight it) and choose Edit> AutoText. Select the category you want to put it in. Type a meaningful name for it... OOo will suggest a shortcut based on the name but you can type anything you want there, even a single letter. Click the AutoText button and choose New. Click Close.
Now type the shortcut and F3.
Note that if you don't hit F3 and you keep typing the name you gave it, the AutoText name will be suggested as an AutoComplete item. If you press Enter (or whatever you have set to accept an AutoComplete) that too will insert the AutoText.
| Edit: So, to combine my earlier suggestion on using styles with the above instructions, you'd want to create a paragraph style and call it Interview, or some other meaningful name. Edit it in the Stylist to adjust the spacing above the text instead of using two paragraph breaks. Now type QUESTION: (that's two spaces) and highlight the text. Create the AutoText entry and give it a shortcut of q. When you type q and F3, note that it uses the paragraph style you assigned, even though you didn't highlight the paragraph mark. It also places your cursor after the two spaces (or should) so you're ready to start typing right away. Note that this is also an excellent method If you need the questions and answers to be in different paragraph styles, at least while you're typing. You can easily change them later if needed. |
Cheers!
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
Re: making "macros" with keyboard
ramona:
Why didn't it work? What went wrong? I have no trouble recording a macro. Maybe I should have written: "Enter any text you want" instead of "Record the macro". But recording macros in OOo is very similar to recording macros in Word. So I feel that shouldn't be a problem.
Why didn't it work? What went wrong? I have no trouble recording a macro. Maybe I should have written: "Enter any text you want" instead of "Record the macro". But recording macros in OOo is very similar to recording macros in Word. So I feel that shouldn't be a problem.
LibreOffice 25.8.4.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Re: making "macros" with keyboard
well, recording the macro is similar but the customize keys part i couldn't follow. and i want to assign it to keys i want, not choose from a few that are in that box. i need to make a lot of macros.floris v wrote:ramona:
Why didn't it work? What went wrong? I have no trouble recording a macro. Maybe I should have written: "Enter any text you want" instead of "Record the macro". But recording macros in OOo is very similar to recording macros in Word. So I feel that shouldn't be a problem.
anyway, foxcole, your idea works. (i don't understand the edit part, tho). i could do it with i+F3. it's just that using F3 is awkward & will slow me down. i wish i could use Alt.
also the font changes after the macro appears. that's not a big problem, i can fix it when the document is done, but it's disconcerting and hard to see because it changes to a smaller font.
i'm going to see if i can do this with a word expander software. do you know how i can disable keys? i'd like to disable, for example, Alt+i which brings up the insert menu. Also Alt+o, etc. (maybe this should be a seperate thread)
Re: making "macros" with keyboard
* Please note that we are all users here, not developers.
* So you really need something like steno.
* Assigning a shortcut isn't so very hard, yo just need to try a bit. If you can't spare a minute or two to find out how it works, you should really start thinking about commercial software and hardware for your job. Or rather, get it right away. Even then, you'll need to spend some time to get comfortable with it. No matter what software you use, free or well paid for, it just takes a bit or a lot of time to learn to work with it.
* As far as I can see you can't disable the menu shortcuts. I agree that the number of keys you can customize is limited. You could file an issue about that - But even if that gets adopted in the next update, which I doubt, it won't help you now.
* So you really need something like steno.
* Assigning a shortcut isn't so very hard, yo just need to try a bit. If you can't spare a minute or two to find out how it works, you should really start thinking about commercial software and hardware for your job. Or rather, get it right away. Even then, you'll need to spend some time to get comfortable with it. No matter what software you use, free or well paid for, it just takes a bit or a lot of time to learn to work with it.
* As far as I can see you can't disable the menu shortcuts. I agree that the number of keys you can customize is limited. You could file an issue about that - But even if that gets adopted in the next update, which I doubt, it won't help you now.
LibreOffice 25.8.4.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Re: making "macros" with keyboard
(Ramona, I wish you would please use your Shift key. It's difficult to read sentences that aren't capitalized properly. They're easier to type but are inconsiderate of readers.)
Maybe it would help to assign a shortcut letter that's typed with the left hand, such as "g,"so your hand is already near the F3... then you could position your hand to type the letter with your thumb and hit F3 with your middle finger. That makes typing it much faster.
But the problem is easily corrected. You're not using paragraph styles correctly. You created your text and formatted it with the font size on the toolbar drop-down instead of through Styles and Formatting. I really wish those toolbar formatting tools were never put in place, because they just cause problems and confusion for people. Those apply direct formatting instead of editing the style, so what you're seeing is the font that the paragraph style uses. The paragraph style does not use direct formatting.
To use Writer well, you really need to become familiar with the Stylist (the Styles and Formatting window). I've already explained about editing the paragraph style:
So---to fix your font problem, click in the paragraph you inserted with AutoText. Open the Stylist. It automatically opens to the Paragraph category, and the current style is highlighted in the list. (Just to be sure, though, compare the highlighted style to the style that shows up in the toolbar, to the left of the font selection.) As I described above, right-click on that style and choose Modify. Now look for the Font tab and make the changes you want.
You'll also want to save your document as a template. Styles are stored in the document. They don't affect new documents or existing ones. But documents created from a template that contains the style will also contain the style. Templates and how to create them are explained in the Help file as well as in the Writer Guide. (See the links in my sig below. I prefer the PDF version; seems easier to search, and I don't have to keep scrolling to the top of the page to click the link to go to the next page.) Or you can find the tutorial entitled "[Tutorial] Creating a new default template". But I urge you to obtain the Writer Guide.
What about it can I try to explain better?ramona wrote:(i don't understand the edit part, tho).
Well, that's just not how OOo is programmed to create AutoText. To use Alt, you'd have to find a different way to do the job... but there is a way: record a macro while you insert the AutoText, and then you can assign this to a key combo. But I think that overall you'd save time and keystrokes just using the i+F3.ramona wrote:i wish i could use Alt.
Maybe it would help to assign a shortcut letter that's typed with the left hand, such as "g,"so your hand is already near the F3... then you could position your hand to type the letter with your thumb and hit F3 with your middle finger. That makes typing it much faster.
Do you mean after the AutoText appears? That isn't a macro, though.ramona wrote:also the font changes after the macro appears.
But the problem is easily corrected. You're not using paragraph styles correctly. You created your text and formatted it with the font size on the toolbar drop-down instead of through Styles and Formatting. I really wish those toolbar formatting tools were never put in place, because they just cause problems and confusion for people. Those apply direct formatting instead of editing the style, so what you're seeing is the font that the paragraph style uses. The paragraph style does not use direct formatting.
To use Writer well, you really need to become familiar with the Stylist (the Styles and Formatting window). I've already explained about editing the paragraph style:
The quickest way to open the Stylist is to press F11. I always just leave it open, docked as a toolbar to the side of my document window so it doesn't get in the way, because I frequently need to change or adjust styles. But you might not want it that way for typing interviews.Instead, edit the paragraph style that you'll be using (open the Stylist if it isn't already open, right-click on the paragraph style and choose Modify) and add the spacing in the Indents and Spacing tab, Above Paragraph. That way, if you ever need to tweak the spacing (maybe to improve pagination), you only have to make one change.
So---to fix your font problem, click in the paragraph you inserted with AutoText. Open the Stylist. It automatically opens to the Paragraph category, and the current style is highlighted in the list. (Just to be sure, though, compare the highlighted style to the style that shows up in the toolbar, to the left of the font selection.) As I described above, right-click on that style and choose Modify. Now look for the Font tab and make the changes you want.
You'll also want to save your document as a template. Styles are stored in the document. They don't affect new documents or existing ones. But documents created from a template that contains the style will also contain the style. Templates and how to create them are explained in the Help file as well as in the Writer Guide. (See the links in my sig below. I prefer the PDF version; seems easier to search, and I don't have to keep scrolling to the top of the page to click the link to go to the next page.) Or you can find the tutorial entitled "[Tutorial] Creating a new default template". But I urge you to obtain the Writer Guide.
Cheers!
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
Re: making "macros" with keyboard
Sigh. Getting a new computer is like a demanding new job i'm not getting paid for. Too bad this forum doesn't automatically capitalize for you. When you type for a living any extra keystrokes are just too much.
Anyway, i got a hold of Word so the problem is solved as far as my paid job. i REALLY appreciate all your help (and links) and i am going to keep trying your tips. i like OO & want to get to know it.
i will label this thread solved (if i can figure out how) becuase the immediate issue is solved for me.
EDIT: Don't mean to be selfish but it doesn't seem like this is something anyone else cares about doing.
Anyway, i got a hold of Word so the problem is solved as far as my paid job. i REALLY appreciate all your help (and links) and i am going to keep trying your tips. i like OO & want to get to know it.
i will label this thread solved (if i can figure out how) becuase the immediate issue is solved for me.
EDIT: Don't mean to be selfish but it doesn't seem like this is something anyone else cares about doing.
Re: making "macros" with keyboard
LOL.ramona wrote:Sigh. Getting a new computer is like a demanding new job i'm not getting paid for.
I know. I'm a writer and editor, so I do type for a living. I also type quite a bit in contributions to forums and other pursuits, so I'm deeply ingrained with the rule about considering the audience. I'm a strong proponent of minimizing keystrokes for people who spend much or most of their time at a computer, but I've never seen an online forum or message board that is able to automatically change what is typed... I'm pretty sure that's due to technical limitations. Because this forum serves a global cross-section of members, it's expressly important to communicate by the rules of English that are taught globally, in order to communicate effectively. It's exciting to think about, isn't it?, when you realize how far around the world your questions and comments reach.ramona wrote:Too bad this forum doesn't automatically capitalize for you. When you type for a living any extra keystrokes are just too much.
Oh, good! That's the best solution for your immediate needs, because Word is something in which you're experienced and comfortable, so you can use it immediately to best advantage.ramona wrote:Anyway, i got a hold of Word so the problem is solved as far as my paid job.
But I'm also very glad to hear you're not giving up on Writer, because I found that once I bridged the gap, once I understood the strength of styles (and, in my case, master documents), Writer suddenly revealed its logic and structure and in that moment it eclipsed Word in my world. My world... in which I've used Word for over two decades.
It's unfortunate, in my opinion, that Sun (et al) pushes the concept of OOo's compatibility with Microsoft Office as a main selling point. I think they should market OOo's own merits and make a note of MS Office compatibility as a kind of perk, especially because there is no third-party software in the world that can match up perfectly with OFfice's inner gyrations... imperfect by dint of the MS closed-source policy that forces developers to guess how MS Office programs work.
ramona wrote:EDIT: Don't mean to be selfish but it doesn't seem like this is something anyone else cares about doing.
Cheers!
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
Re: making "macros" with keyboard
ramona was referring to tagging threads 'Solved'foxcole wrote::?: I'm not sure I understand what you're talking about...ramona wrote:EDIT: Don't mean to be selfish but it doesn't seem like this is something anyone else cares about doing.
Re: [Solved] making "macros" with keyboard
I was rather thinking that he meant that nobody else seems to be wanting a solution for the kind of thing he is doing.
LibreOffice 25.8.4.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Re: [Solved] making "macros" with keyboard
Except that I did mention in my first post that I had seen a similar question but I didn't think anyone had come up with a solution... so there is likely a need.floris v wrote:I was rather thinking that he meant that nobody else seems to be wanting a solution for the kind of thing he is doing.
Cheers!
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
---Fox
OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit