Compare subroutine variable at Automacro statement

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

rocknroll
Been there done that!
Been there done that!
Posts: 118
Joined: 19 Sep 2011, 07:30
Noob?: Yes

Compare subroutine variable at Automacro statement

#1 Post by rocknroll »

I could not give a branching in the block automacro, i thinking about if I could compare it to a variable that I have created in the subroutine.

please help me, thank you

Code: Select all

automacro answer {
 pubm /(.*)/
 var .lastMatch1 = $answr ###i'm confuse at this line
 call {
	do c Wow, you did it. The answer is $answr
	}
}

sub test {
	$::Macro::Data::varStack{answr} = "openkore";
}
Sorry, my english is very bad !
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Compare subroutine variable at Automacro statement

#2 Post by EternalHarvest »

Macro variables do not work in automacro conditions. You can use eval condition to get it.