Edit macros with Notepad++

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

Post Reply
Holladerwaldelf
Cave Troll
Posts: 74
Joined: Fri Aug 07, 2015 1:16 pm

Edit macros with Notepad++

Post by Holladerwaldelf »

Is there a more elegant way to edit macros with an editor like Notepad++ than to copy and paste the code from the edit-macro-mask of maptool into Notepad++, change the code there and then recopy and paste the changed code back into the edit-macro-mask of maptool?
Maptool has to save the code for each macro somewhere, doesn't it? But where?
Thank you for any help.

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Edit macros with Notepad++

Post by aliasmask »

I have an update for Notepad++ and a drop-in called RPEdit that you can use. It's still cut and paste, but you can do multiple macros at a time. See my signature.

Holladerwaldelf
Cave Troll
Posts: 74
Joined: Fri Aug 07, 2015 1:16 pm

Re: Edit macros with Notepad++

Post by Holladerwaldelf »

Thank you for the answer. I am already using that.
I was hoping for an even better way. :)

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Edit macros with Notepad++

Post by JamzTheMan »

So we had another request for reading/writing files via macro...

I'll have a submission for this for 1.4.3.x, but realized it may greatly assist this drop-in resource... So watch slack for updates ;)

Of course, there may be even better ways in the near future.......
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Edit macros with Notepad++

Post by aliasmask »

JamzTheMan wrote:So we had another request for reading/writing files via macro...

I'll have a submission for this for 1.4.3.x, but realized it may greatly assist this drop-in resource... So watch slack for updates ;)

Of course, there may be even better ways in the near future.......
With the new java(javascript?) related functions, will the file operations be available?

Out of curiosity, how would people like to update macros? Currently, with notepad++ and rpedit all you need to do is select a token, run edit macros (which opens a frame), click load in the frame selecting either all, groups or individual macros (which loads in to textarea), copy, paste in to notepad++, edit, copy all or selected macros (ctrl-shift-c for single macro with my npp addon), paste in to textarea frame and click Save. Editing and testing from there is pretty simple. Having it read directly from the saved text file I think could cause unforeseen problems if say you have some bad formatting. Often in development I will make notes or leave bits of code outside of the formatted macro areas.

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: Edit macros with Notepad++

Post by RPTroll »

My preference would be to edit the macros on the file system and have MapTool pick up changes, or have a command the refreshes macros from files. That way you can use whatever editor you want: eclipse, notepad++, or VIM - the ultimate code editor. :D
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Edit macros with Notepad++

Post by JamzTheMan »

I was thinking a macro that read the file would still need to parse and place it in the proper macro. It really just skips the copy paste...

FYI e read/write macro function would we generic and for other uses too. It would only have access to a folder under .maptool as well for security purposes.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

taustinoc
Dragon
Posts: 518
Joined: Mon Aug 03, 2015 6:30 pm

Re: Edit macros with Notepad++

Post by taustinoc »

For what it's worth, I'd love to see that. It'd be a lot easier to update token properties en masse that way than tampering with .rptok files directly.

Post Reply

Return to “Macros”