[B91-1.4.1.8, Nerps] Macro Writing Starter Kit

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

User avatar
aliasmask
Deity
Posts: 8667
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [B91-1.4.1.8, Nerps] Macro Writing Starter Kit

Post by aliasmask »

Updated the OP to include more info on the downloads and fixed a couple of bugs with the lib:token and decided to simplify the built in functions. There were many downloads, but only recently did bobifle point out the bugs which tells me people may have downloaded and then never used the lib token. I had a fix for my campaign, but didn't realize I didn't upload it here. Sorry about that.

I still plan on making a video demonstrating the install and use of the files and tokens and hopefully we can get more people to make macros and share with the community.

User avatar
emirikol
Dragon
Posts: 708
Joined: Sun Jan 13, 2008 5:52 pm
Location: Lakewood, CO North America
Contact:

Re: [B91-1.4.1.8, Nerps] Macro Writing Starter Kit

Post by emirikol »

Thanks for the update
Yes, I'm a chiropractor. Gamer fitness at Hafner Chiropractic in Lakewood, CO: http://www.HafnerChiropractic.com

User avatar
Shadowfireomega
Giant
Posts: 210
Joined: Thu Dec 23, 2010 12:12 am
Location: San Antonio, Texas

Re: [B91-1.4.1.8, Nerps] Macro Writing Starter Kit

Post by Shadowfireomega »

I have an apostrophe(single quote) in a text output portion of my code, and everything after it is red until the next one, is there a way to tell notepad to ignore specific ones?
"I love being wrong, for if I was always right, there would be nothing left to learn, and that would be a world I would not want to live in."
-Benjamin Fisher
"Knowledge is knowing a tomato is a fruit; wisdom is not putting it in a fruit salad."
-Miles Kington
"Space is his favorite thing in the world!"
-Kayla Kros
"Anything times 1 is 1"
-Kayla Kros

User avatar
aliasmask
Deity
Posts: 8667
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [B91-1.4.1.8, Nerps] Macro Writing Starter Kit

Post by aliasmask »

Depends on the context. A single quote in quotes will not do that. I suggest you put your output text in to a variable and then output it all at the end of the macro. I have a link to best practices in my signature and doing this solves several problems like the one you describe among others.

http://forums.rptools.net/viewtopic.php ... 86#p233681

The other option if you're outputting the single quote is to use the html entity, '

User avatar
Shadowfireomega
Giant
Posts: 210
Joined: Thu Dec 23, 2010 12:12 am
Location: San Antonio, Texas

Re: [B91-1.4.1.8, Nerps] Macro Writing Starter Kit

Post by Shadowfireomega »

Yep, all my output will be at the end. This is part of a strProp, albeit one that I have now renamed to exclude the ' in it. Thanks for the info tho!
"I love being wrong, for if I was always right, there would be nothing left to learn, and that would be a world I would not want to live in."
-Benjamin Fisher
"Knowledge is knowing a tomato is a fruit; wisdom is not putting it in a fruit salad."
-Miles Kington
"Space is his favorite thing in the world!"
-Kayla Kros
"Anything times 1 is 1"
-Kayla Kros

venger
Giant
Posts: 144
Joined: Tue Apr 17, 2007 11:37 am

Re: [B91-1.4.1.8, Nerps] Macro Writing Starter Kit

Post by venger »

Hello aliasmask
Thanks for this post on Notepad ++, very cool.
Had an issue though, worth knowing about.
During your specialties install procedure, there was no APIs folder and I had to create it, then drop maptool.xml in there.

Language keyword Colors worked, but autocomplete didnt.
So just for shitz&giggles I dropped a copy of maptool.xml under the -Autocompletion- folder where a bunch of other xml's lived and after a bit of fooling around it started working... huh go figure, its working, not griping here at all! So I dont know which xml is in the right place.

[edited]
Observation in retrospect- autocomplete didnt work until after I saved some code I was working on.
Upon saving, I lost the colors, so went back to languages and chose maptool again.
It was sometime after that I noticed Notepad++ offering maptool autocompletion assist.
Apparently working. And saving doesn't revert to default language colors anymore. Must have done some config on save.

So I have 2 copies of maptool.xml up in the NP++ folders but scared to delete either, and waiting for the shoe to drop lol
Anyway this is nice

On to your tokens, installing and learning what those are about. I feel adventurous today!

User avatar
aliasmask
Deity
Posts: 8667
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [B91-1.4.1.8, Nerps] Macro Writing Starter Kit

Post by aliasmask »

venger wrote:
Sun Sep 29, 2019 8:32 am
Hello aliasmask
Thanks for this post on Notepad ++, very cool.
Had an issue though, worth knowing about.
During your specialties install procedure, there was no APIs folder and I had to create it, then drop maptool.xml in there.

Language keyword Colors worked, but autocomplete didnt.
So just for shitz&giggles I dropped a copy of maptool.xml under the -Autocompletion- folder where a bunch of other xml's lived and after a bit of fooling around it started working... huh go figure, its working, not griping here at all! So I dont know which xml is in the right place.

[edited]
Observation in retrospect- autocomplete didnt work until after I saved some code I was working on.
Upon saving, I lost the colors, so went back to languages and chose maptool again.
It was sometime after that I noticed Notepad++ offering maptool autocompletion assist.
Apparently working. And saving doesn't revert to default language colors anymore. Must have done some config on save.

So I have 2 copies of maptool.xml up in the NP++ folders but scared to delete either, and waiting for the shoe to drop lol
Anyway this is nice

On to your tokens, installing and learning what those are about. I feel adventurous today!
Yep, I have a note at the top of the page about that:
Last Updates:
11-25-18 - OP page rewrite
12-01-18 - Minor config.xml update
5-23-19 - MISSING APIs Folder (1:50 of video): The newer version 7.6.6 has an "autoComplete" folder under Notepad++ folder. Put maptool.xml there instead.

Post Reply

Return to “Macros”