Page 1 of 1
pulling a declared string at the start of a macro
Posted: Fri Jul 17, 2015 1:44 pm
by MyEmQueTwo
I am trying to figure out how to pull a name when starting a macro and then have it target that name
For example:
Code: Select all
HealTarget.mac
/macro HealTarget.mac nameoftarget
I then want the macro to be able to target the name ive defined like such:
I know there are other ways/more efficent ways, etc, yes, but I am trying to learn myself and just need some example of how this is done. Any help would be appreciated.
Re: pulling a declared string at the start of a macro
Posted: Fri Jul 17, 2015 2:15 pm
by Maskoi
param - The macro will pick up the variably after the Macro Name. Each new param is determined by a space. if the info that needs to be passed has spaces then it needs quotes. "Info with spaces"
/mac mcaroname param0 param1 param2
Code: Select all
/if (${Defined[Param0]}) {
/varset nameoftarget ${Param0}
}
Re: pulling a declared string at the start of a macro
Posted: Fri Jul 17, 2015 4:00 pm
by MyEmQueTwo
Thanks a bunch, learned what I needed =)
Re: pulling a declared string at the start of a macro
Posted: Sat Jan 17, 2026 11:02 am
by xyilla
Re: pulling a declared string at the start of a macro
Posted: Sat Jan 17, 2026 11:03 am
by xyilla
Re: pulling a declared string at the start of a macro
Posted: Sat Jan 17, 2026 11:05 am
by xyilla
Re: pulling a declared string at the start of a macro
Posted: Sat Jan 17, 2026 11:07 am
by xyilla
Re: pulling a declared string at the start of a macro
Posted: Sat Jan 17, 2026 11:08 am
by xyilla
Re: pulling a declared string at the start of a macro
Posted: Sat Jan 17, 2026 11:09 am
by xyilla
Re: pulling a declared string at the start of a macro
Posted: Sat Jan 17, 2026 11:10 am
by xyilla
Re: pulling a declared string at the start of a macro
Posted: Sat Jan 17, 2026 11:11 am
by xyilla
Re: pulling a declared string at the start of a macro
Posted: Sat Jan 17, 2026 11:13 am
by xyilla
Re: pulling a declared string at the start of a macro
Posted: Sat Jan 17, 2026 11:15 am
by xyilla