Transfer Variables from EventMacro to Macro

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

Moderator: Moderators

Post Reply
Message
Author
Glikadin
Human
Human
Posts: 29
Joined: 09 Dec 2016, 09:05
Noob?: Yes

Transfer Variables from EventMacro to Macro

#1 Post by Glikadin »

Hello! Me need help:

EventMacro:

Code: Select all

macro Test1 {
$EventMacroVariable = 1
}
Macro:

Code: Select all

macro Test2 {
log ???$EventMacroVariable???
}
How to get Variable from EventMacro in Macro ?

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 724
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: Transfer Variables from EventMacro to Macro

#2 Post by fadreus »

use console?

Code: Select all

console /[eventMacro] <regexp>/
If using automacro on eventMacro calling macro, can use console command calling macro:

Code: Select all

do macro <macro name>

iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

User avatar
help_us
Testers Team
Testers Team
Posts: 106
Joined: 04 Apr 2008, 21:53
Noob?: No
Location: Asia
Contact:

Re: Transfer Variables from EventMacro to Macro

#3 Post by help_us »

Code: Select all

macro Test1 {
         $EventMacroVariable = 1
}

automacro checkTest1 {
    var .EventMacroVariable = 1
    timeout 2
    call {
        log var \$EventMacroVariable is $EventMacroVariable
   }
}
Image
Image

sctnightcore
Developers
Developers
Posts: 246
Joined: 09 Apr 2017, 07:23
Noob?: No
Location: Thailand

Re: Transfer Variables from EventMacro to Macro

#4 Post by sctnightcore »

help_us wrote:

Code: Select all

macro Test1 {
         $EventMacroVariable = 1
}

automacro checkTest1 {
    var .EventMacroVariable = 1
    timeout 2
    call {
        log var \$EventMacroVariable is $EventMacroVariable
   }
}
Do you help discord ?
sctnightcore24hour#1063
Add me

i will add you to openkore-dev room

Yaham
Human
Human
Posts: 31
Joined: 28 Nov 2010, 00:57
Noob?: No

Re: Transfer Variables from EventMacro to Macro

#5 Post by Yaham »

help_us wrote:

Code: Select all

macro Test1 {
         $EventMacroVariable = 1
}

automacro checkTest1 {
    var .EventMacroVariable = 1
    timeout 2
    call {
        log var \$EventMacroVariable is $EventMacroVariable
   }
}


Just for knowledge, this variables persists until the kore section get closed?

Post Reply