[1.3.70] "Run This" button

If you have an idea for a new feature, please discuss it in the main MapTool forum first, then post a summary of the discussion here. Use the first Sticky as a template.

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

Post Reply
User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

[1.3.70] "Run This" button

Post by plothos »

When editing macros I find it is often necessary to run the thing to see how it's working and/or how the results appear.
When bug-hunting/optimizing/aetheticizing this means
1. Find the macro button
2. Right click on it and scroll to edit (and hopefully miss the other options)
3. Finally go into the code and make changes
4. Click okay
5. Find macro button
6. Click to run
7. Study Results
8. Find macro button
9. Right click scroll to edit
10. Find place you were last working (usually)
11. Get back to your changes

If the macro edit button had an option to run the code currently in the window so you could see it, macro fiddling would be more convenient.
1. Find the button
2. Right click go to edit
4. Go into code and make changes
5. Click "Run This"
6. Study results
7. Return to your changes.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

User avatar
mfrizzell
Dragon
Posts: 762
Joined: Sat Feb 13, 2010 2:35 am
Location: California

Re: [1.3.70] "Run This" button

Post by mfrizzell »

That would be cool. I usually copy and paste into the chat box to see how something runs and then make changes to the text file, then copy and paste again.
DCI/RPGA# 7208328396 Skype ID mfrizzell77
Characters:
Strabor - Dwarf Avenger 5th Level
Tikkanan - Human Warlock 2nd Level
----------------------------------------------------
"People are more violently opposed to fur than leather because it's safer to harass rich women than motorcycle gangs."

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

Re: [1.3.70] "Run This" button

Post by JamzTheMan »

That would be nice for some things (for others, a lot of macros are kicked off by other macro's/links so wouldn't work for that situation).

Have you tried using the Import/Export macros?: http://forums.rptools.net/viewtopic.php?f=46&t=14311

Coupled with Aliasmask's Notepadd++ syntax highlighting file, it's helped me A LOT to code faster. Not only do you get the color coded keywords, but a larger screen (ie Notepad++) to code in.

All I do is export once the macros I'm working on. Edit in Notepad++, leave the Import frame docked in the lower right corner, then repeatedly:

1. Copy text from Notepad
2. Paste in MT import frame
3. Click Submit Query
4. Click Macro/link to execute
5. Study results

Since the import frame remembers the token you copied from, and it exported code has the macro name/details, you don't have to re-find your Lib token anymore or the macro button on the Lib token!
-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
Mathemagician
Dragon
Posts: 666
Joined: Tue May 22, 2007 2:27 pm

Re: [1.3.70] "Run This" button

Post by Mathemagician »

I would definitely like this

Imper1um
Cave Troll
Posts: 92
Joined: Mon Sep 28, 2009 7:46 am

Re: [1.3.70] "Run This" button

Post by Imper1um »

If we were only functioning in C# or C++, we would be able to use a Debugger even in external code. :P

It would be nice if there was a 'Run this macro' button, although I wish that Edit Macro Windows were:

1. Not Modal
2. Had an 'Apply' button.

I use a model for my macros that are Launcher -> Sorter -> Parsing, so if I'm in a Parsing macro, I want to be able to use the Launcher. :P

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: [1.3.70] "Run This" button

Post by Craig »

Imper1um wrote:If we were only functioning in C# or C++, we would be able to use a Debugger even in external code. :P
I think you have an incorrect understanding of how such things work -- or being disingenuous -- neither of those languages has more support for doing this than Java (in fact c++ has a lot less). There is nothing to stop you from grabbing the source and debugging while run a macro. You could do it without the source but the debugging information you will get is a lot less useful -- regardless of what language you are using.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: [1.3.70] "Run This" button

Post by Azhrei »

And Craig added calls to logger.debug() throughout the macro processing code and turning on that output can help with some (not all) macro-related issues. I just posted about this in another thread and I suppose I should create a wiki page for it, but it's documented inside the logging.xml file that comes with the ZIP download.

Post Reply

Return to “Feature Requests”