[macro.return] and frames

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
User avatar
Xaelvaen
Dragon
Posts: 498
Joined: Wed Aug 31, 2011 9:49 pm
Location: Somewhere between Heaven and Hell

[macro.return] and frames

Post by Xaelvaen »

I'm having trouble using a macro.return function in a frame. Basically, I have a frame that takes player input. I send that information to another macro to be calculated. What I'd like that to do, is use a macro.return function to then display that information at the bottom of the same frame. It seems, though, that macro.return isn't working <form action***>.

A, is this even possible?
B, if not, is there some workaround? Perhaps reloading the same frame from the same calling macro with new jsons?
"An arrogant person considers himself perfect. This is the chief harm of arrogance. It interferes with a person's main task in life - becoming a better person." - Leo Tolstoy


User avatar
Xaelvaen
Dragon
Posts: 498
Joined: Wed Aug 31, 2011 9:49 pm
Location: Somewhere between Heaven and Hell

Re: [macro.return] and frames

Post by Xaelvaen »

Not exactly what I was looking for - I used that tutorial to build my onChange~ character sheet. However, I just used a workaround like I mentioned above where the sheet is simply re-opened with the rolled information in place. Didn't want to do that, because it's a lot trickier, but since a simple macro.return wouldn't work, I guess I had no choice.

Thanks for the response, Wolph!
"An arrogant person considers himself perfect. This is the chief harm of arrogance. It interferes with a person's main task in life - becoming a better person." - Leo Tolstoy

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

Re: [macro.return] and frames

Post by aliasmask »

Yeah, there's no javascript so any changes made require the form to be redrawn. It's usually called a call back from another function. So, the macro you call needs call the callback to redraw the frame.

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

Re: [macro.return] and frames

Post by JamzTheMan »

FYI there is some javascript support in the dev version and my fork, although I have not played with it at all... Do a search and you should find some info?

Again, not sure if it will help you in this situation though, it's mostly an alternative way of doing macro logic AFAIK.
-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
Xaelvaen
Dragon
Posts: 498
Joined: Wed Aug 31, 2011 9:49 pm
Location: Somewhere between Heaven and Hell

Re: [macro.return] and frames

Post by Xaelvaen »

I know absolutely nothing about javascript, and pretty much any html I use, I just use w3schools to tell me what I'm doing XD.

I just used the normal method of [openFrame] macro, [theSheet], and refreshing it all through macro.args. I was honestly just looking for a shortcut to that process, but it is what it is, and I'll get the job done one way or the other!

Thanks though, Jamz.
"An arrogant person considers himself perfect. This is the chief harm of arrogance. It interferes with a person's main task in life - becoming a better person." - Leo Tolstoy

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

Re: [macro.return] and frames

Post by JamzTheMan »

No problem, definitely stick with what you are doing then! :)
-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

Post Reply

Return to “Macros”