Macro Links Executing Right away?

Confirmed bugs should get a single post here. Check the READ ME FIRST sticky thread for the format.

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice, MapTool BugReport Manager

Forum rules
Posts that do not conform to the READ ME FIRST sticky thread are subject to deletion.
Post Reply
RevenantBob
Cave Troll
Posts: 36
Joined: Sat May 19, 2012 3:41 pm

Macro Links Executing Right away?

Post by RevenantBob »

I'm not sure if this is a bug or intentional, but if I output a macro link to the chat window they are being executed right away. Is this intentional?

I wanted a macro so people could link token handouts easy for people to click if they want to look.

The campaign macro is set to auto execute and apply to selected token:

Code: Select all

[h: macroArgs = "handout=" + getTokenHandout() + ";"]
[h: linkText = getName() + " Handout"]

[r: Macrolink(linkText, "imageShow@Lib:LIBGame", "self", macroArgs, currentToken())]
On the referenced library token I have the script "imageShow" with the following code:

Code: Select all

[h: handoutImage=getStrProp(macro.args,"handout")]
[Frame("Image Handout"): {
    <img src="[r:handoutImage]"></>
}]
When someone clicks the macro everyone automatically sees the the handout. Which is strange since I'm just trying to make a link.

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

Re: Macro Links Executing Right away?

Post by aliasmask »

So, does it run when you post the link or when someone clicks the link in the chat? Make sure autoexecute if off on the macro imageShow and see if that helps.

RevenantBob
Cave Troll
Posts: 36
Joined: Sat May 19, 2012 3:41 pm

Re: Macro Links Executing Right away?

Post by RevenantBob »

Looks like autoexecute was doing it. Thanks!

Post Reply

Return to “Bug Reports”