• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Phrase Express Macros for Realm Works

MNBlockHead

Well-known member
Based on discussions on other threads, there is some interest in discussing how to use Phrase Express to help automate tasks in RealmWorks.

PhraseExpress is a text expander and universal-macro program that is free for personal use.

http://www.phraseexpress.com/freeware.htm

There are other tools out there like this. ActiveWords is a good one that I used for many years and there are some open-source options like AutoHotKeys. I've just found PhraseExpress to offer the most powerful set of tools in a fairly user-friendly interface (there is a learning curve to the advanced stuff, but still easier than much of the competition, IMO).

This thread is a place where folks can share tips and macros for using PE with RW as well as a place to introduce alternatives.
 
Last edited:
REVEAL TOPIC AND ALL SNIPPETS

One annoyance in RW is that if I want to reveal a topic and ALL of its snippets, I either must click on all the little circles to the left of each snippet, or click through the conent-page-options. The following script will automat that for you. I associated mine with the hotkey combo CNTRL+ALT+F12, but you can assign any hotkey or create a phrase.

THE SCRIPT:

Code:
{#CTRL {#SHIFT -chars r}}{#F7}{#DOWN -count 7}{#RIGHT}{#ENTER}
 
Last edited:
Interesting - I think I will be looking into phraseexpress.

Until then, I am afraid I have little to contribute with :-)

Addition
Installed - your version is the full version with mouse recording etc?
 
Last edited:
I use it for work as well, so I bought the full version, but I'm out of maintenance and have not upgraded to the newest version. I'll probably wait until there is something I feel my current version lacks that I really want. For now, it does everything I want and I'm barely scratching the surface of how to use it.

The mouse macros are neat, but I really don't use them that much. You have to make sure that the window will be size the same and I also find that I have to fiddle around alot with timing, creating sufficient delays for the program to respond before clicking the next item.

Thinks work much better if you can find a keyboard way of getting somewhere.
 
Phrase Express is something I picked up for work. Mostly I have used it to automatically complete phrases I find myself typing in emails all the time. It is actually a pretty great program that I feel like I have never really taken full advantage of. I eagerly await any tips or ideas to help integrate it into Realm Works.
 
Macro to Collapse Entire Hierarchy and Groups

COLLAPSE ENTIRE HIERARCHY AND ALL GROUPS AT THE SAME TIME
I don't know why, but I like to start with all groups and subgroups in the navigation pan collapsed. Currently, you have to first go to the World Almanac Options, click on the toolbar icon, and then select collapse entire hierarchy to collapse all the sub-groups. Then you have to click on the tool icon on one of the groups and select "collapse all groups."

I created the following macro to do it all at once using the hotkey [CNTL][-]
("control minus"). I also selected the option to only use this macro in Realm Works, since that hot key is used for other purposes in other applications I use.

Code:
{#F6}{#DOWN -count 9}{#ENTER}{#mouseposition -x 160 -y 192}{#LEFTMOUSEBUTTON}{#DOWN -count 3}{#ENTER}

Note that you could switch it and put
Code:
{#mouseposition -x 160 -y 192}{#LEFTMOUSEBUTTON}{#DOWN -count 3}{#ENTER}
in the front. You can still collapse the entire hierarchy with the groups already collapse, but I like to watch everything quickly collapse in order. Just my preference.

One trick with this macro is that you need to know the X/Y coordinates of your mouse cursor, so PhraseExpress knows where the tool icon on one of the groups is. I recommend the top one (Sources) since it should always be there, both in topic (e.g. "world almanac") and article ("mechanics") view. I always use RW with the window fully expanded to take up my entire screen. The macro won't work with the window sized down.

Also I do often use an additional monitor with my laptop, but rarely use RW in it, otherwise I would need a separate macro for that screen. Unfortunately, I don't know of a way to open the group menu tools just by using the keyboard.

Note that this macro does NOT require the mouse recorder. You just need the X and Y coordinates. How to get them? There is a tiny program you can get here that will show the exact coordinates of you mouse cursor: http://www.adminsehow.com/2012/03/realtime-mouse-position-monitor-tool/ You need .NET framework installed in order for it to work.

When I use the code markup, it formats it so you have to scroll horizontally to see it. Below, I'm just pasting the code text without marking it as code:

{#F6}{#DOWN -count 9}{#ENTER}{#mouseposition -x 160 -y 192}{#LEFTMOUSEBUTTON}{#DOWN -count 3}{#ENTER}
 
Last edited:
Is there any way to expand some text into formated text in a snippet ?

ultimately something like "stats" expanded into a table with force dex con etc ...

Suggestion for this thread:

It could be easier for everyone if macro were gathered at the begining of the thread (the first 2 posts) so that discussions on these do not hinder the this thread main objective : provide phrase express macros.
 
Last edited:
Yes. Phrase Express supports rich-text formatting. You can also use it to paste document into other documents. Right now, the way I use it, I have two statblock templates, one with lables and headers for all the things I might ever want in a stat block (for use with important, reoccuring NPCs, and another that is just the basics (for monster encounters in scene topics). Both have the same trigger work (statblock).

I type the word "statblock" into the snippet and a popup prompts me to select which one I want to use. I select the one I want and it pastes a nicely formatted statblock table with cell color fills, bold and italic text, etc. But I still have to go and type in the stats, so:

I'm currently working on a macro where a form prompts me for AC, hit dice, etc. and then it will generate the fully formatted stat table and paste it into the active snippet. Also, it will automatically calculate the modifiers based on the attributes you enter.

It would be pretty easy to add randomly generated stats, but usually for frequently encountered opponents (bandits, certain monster types), I just use a standard stat block. Same with NPCs, I generally go with default stats from the Monster Manual for commoner, bandit, noble, etc., unless they are a particularly important NPC, in which case I wouldn't likely randomize their stats.
 
Could you please post the macro so we get a better idea on how to do it (in other words we'd like to steal your stuff :cool:)
 
You can use Phrase Express to randomize anything. It is easy to import delimited text file to create the list you want to randomize selection from and, once you have a number of lists, it is trivial to combine them:

There is a {#insert ##chestdescription -random} containing {#insert ##coins -random} and a {#insert ##trinket -random}.

You can get really complicated with this, but I really don't use it this way since I don't like to randomly generate a lot of things in the adventures I create. I think it makes the game feel generic and video-gameish.

But there are some things, like book titles that make sense to generate randomly if characters are absently browsing bookshelfs. I can just edit a scene as the players are in it and as the look at books, I can just type "rbook" and it Phrase Express will automatically replace that word with the name of the book and its coin value. I don't bother generating entire lists before the game—rarely would they look at every or even any book, so it would be a waste of time. I do it during play when they do bother to look.

I do plan to make a number of different books lists, appropriate to different locations. Also, you can nest randomizers, so I could have a list of 1000 books and one of the items in that list could be rare. If rare comes up, it would trigger another random list.

If I really go through building up a number of large lists, I will likely have rbook trigger a pop up asking me to select culture, environment, etc. Maybe rarity (the rarity selection could change the % chance of a rare book).

This all seems like a lot of work, but I find it EASIER to copy from book lists shared online or that I buy from EN5ider and DriveThruRPG and paste them into plain text (e.g. notepad...though I use UltraEdit) and import them into PE, then I do trying to create large random-roll tables in RW.

Slowly but surely, I'm replacing my random-roll tables in RW, Inspiration Pad, and Evernote with lists in PE.

That way, all I have to do, no matter WHAT program I am in, it type a trigger word and have it magically replaced with whatever it is that I wanted randomized.

The one thing I've not made a decision on yet, is how to handle random tables, especially simple ones, in a specific scene description. E.g., I have a scene or area topic for the Spooky Woods and you have and X% chance of an encounter. In the event of an encounter you roll a d20 and consult a table with 20 possible encounters.

Do I want to create a macro for a one-game use?

On the one hand, why clutter my PE library?

On the other, it doesn't take much more time than formatting a table in RW. Instead of a table, I would have a notation in RW like: You have a 35% chance of an encounter for every hex traveled in the Spooky Wood. If an encounter is rolled, use PE "rspookywoods".

I can easily folder phrases by adventure in PE and put them all under an "Adventure Specific" folder to keep things tidy.

I kinda like rolling dice, though, so I would probably only use PE for generating random items from large, frequently consulted lists.
 
Could you please post the macro so we get a better idea on how to do it (in other words we'd like to steal your stuff :cool:)

Well, it really isn't a macro. It is a sraight up text replacement. See the attached screenshot, which shows a very simple 5e statblock.

It is difficult to show how to build a form in one screen shot. I would need to make a step-by-step tutorial. First, I want to complete and test the one I'm building, and second, it would take some time to write up. Also, while I like to dig into the macros and understand how to type them out in plan text, it is MUCH easier to use the Macro menubar in PhraseExpress. You simply put your cursor where you want to fill in text, and go to Macro—>Form—>Text Input box. And fill in your parameters. Where it gets more complicated is when you want to calculate values based on inputs or use conditional logic (IF...THEN...ELSE). For that you need to know how to set and get temporary values. Look at the #settemp and #gettemp maco commands.

One of the best things about the newest version of Phrase Express is the check text/value tool under Macro—>Programming, that give a GUI for creating macros that use the #check command, which compares a value to something else and outputs text based upon the comparison.

Anyway, I'll try to post a form walkthrough when I find some free time.

ScreenClip.png
 
I was able to make a mouse macro to do line coloring. :)

Now I just need to figure out the rest of it.
 
It is difficult to show how to build a form in one screen shot. I would need to make a step-by-step tutorial.

Don't bother doing so, you've done already enough :) I see how its done thanks to your screenshot.

I first thought I'd have to code so kind of rtf formatting but it looks like you actually don't, phrase express being wysiwyg
 
You know would be interesting if it could do? A macro that scans the paragraph and after each period or question mark it presses enter to put each sentence on it's own line.
 
You know would be interesting if it could do? A macro that scans the paragraph and after each period or question mark it presses enter to put each sentence on it's own line.

You can do this with advanced string operations, but it can get complicated with American-style punctuation (we put our periods/full stops inside quotation marks) and you might have to use the TRIM function since I always get two spaces at the front of each sentence. It would be nice is PE would support RexEx so I could process text with more precision (maybe it does, but, if so, it isn't obvious how).
 
Yes, and for more complicated ones (like if I ever get an NPC-generated made), it would make sense to just share the file than to create a detailed step-by-step.
 
MNBlockHead,

Thank you so much for introducing such as awesome tool.

Some minor contributions.
Combine snippets while keeping extra line between them. Place cursor at end of last line and activate.
Code:
{#ENTER}{#CTRL -chars m}

Add tag field above current snippet
Code:
{#F9}{#DOWN -count 2}{#RIGHT}{#DOWN -count 4}{#ENTER}
 
One thing that I've been playing around with is how to use PE to help with applying tags.

I would like to have a hotkey that would automatically select and enter one or more tags. That is not too difficult as I only need to use HOME to go to the top and then count the number of down arrow presses to reach the tag I want. But the issue is that if you add a tag above the tag in the PE macro, you break the macro.

Unfortunately, you can't just start typing a word to go to a tag. Tagging is one of the things that I most want to automate in RW, but tagging in RW is very mouse dependent. It is not keyboard friendly at all.
 
Back
Top