Page 1 of 1

Transfer Variables from EventMacro to Macro

Posted: 01 Nov 2017, 18:18
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 ?

Re: Transfer Variables from EventMacro to Macro

Posted: 18 Nov 2017, 03:19
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>

Re: Transfer Variables from EventMacro to Macro

Posted: 20 Nov 2017, 12:50
by help_us

Code: Select all

macro Test1 {
         $EventMacroVariable = 1
}

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

Re: Transfer Variables from EventMacro to Macro

Posted: 20 Nov 2017, 13:25
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

Re: Transfer Variables from EventMacro to Macro

Posted: 20 Nov 2017, 13:41
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?