3

In PhraseExpress I've created a macro which converts text into uppercase and it works fine. But the problem is, that I can apply it only to the current OS clipboard content (last copied text fragment) this way.

Is there any option to apply a macro (letter case converter) to a currently selected phrase in the PhraseExpress pop-up list without the need preliminarily to copy the text to the OS clipboard? Or, what would be much better, to convert multiple selected entries (phrases) at once? AFAIK some clipboard manager allow to handle a pop-up list entry directly.

Leopoldus
  • 31
  • 2

3 Answers3

2

I've found a solution for this:

{#clipboard -cut}{#uppercase {#insertclipboard}}

just create the above macro and setup a hotkey combo for it. Now select the text that you need to convert into upper case and hit the hotkey combo, the selected text will automatically be replaced with upper case text, without having to copy the text manually to the clipboard first.

Ghos3t
  • 460
1

You'd have to create a macro like this for converting single entries:

  • Assign an Autotext like $clip to the Clipboard Cache in PhraseExpress.

    1. Find Clipboard Cache.
    2. Enter Autotext in the field Autotext. In this example it is $clip. enter image description here
  • Now you create a macro.

    1. Optional step: Create a folder to store your macro in.
    2. Click on Phrase to create a new phrase in that folder.
    3. Name it something like: "Convert to Uppercase". Then paste this code {#uppercase {#insert $clip}} in the Phrase content.
    4. Now assign it an Autotext. This means that you type the phrase that is supposed to call up the macro in the box Autotext. I have used ,clipup as an example (clipboard uppercase).

If you did as I wrote, your PhraseExpress window will look like this:

enter image description here

When you type the Autotext and select a phrase, it will be converted to uppercase and written where your caret is. This will have to be done one phrase after another. Selecting several phrases is harder.

You could just assign a macro like {#uppercase {#insert $clip -item 1}}} for each entry in the Clipboard Cache. The number after -item is the position of the entry in the Cache.

0

I used the previous poster's idea but just tweaked it so I could make it work for me. This way I just created a new 'phrase', pasted in the macro code below, and assigned it a hotkey (keyboard shortcut).

Then you simply highlight any text you want to convert and PhraseExpress will then cut your selection, convert the text, and then paste it back for you.

Use this macro code to convert selected text to all uppercase:

{#clipboard -cut}{#uppercase {#insertclipboard}}{#clipboard -paste}

And use this macro code to convert each word to start with a capital letter:

{#clipboard -cut}{#uppercaseword {#insertclipboard}}{#clipboard -paste}


Note that there's another similar macro function you can also use to find and replace characters in filenames or text.
For example, using this macro code will replace all spaces with underscores.
{#replace {#insertclipboard} -oldtext   -newtext _}

And this will replace all periods with dashes...:

{#replace {#insertclipboard} -oldtext . -newtext _}


Cheers :)

joabo
  • 61