Lua:executeCodeEx

From Cheat Engine
Revision as of 05:59, 6 September 2020 by Ajanuw (talk | contribs) (Created page with "<b>executeCodeEx(callmethod, timeout, address, {type=x,value=param1} or param1,{type=x,value=param2} or param2,...)</b> <pre> callmethod: 0=stdcall, 1=cdecl timeout: Numb...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

executeCodeEx(callmethod, timeout, address, {type=x,value=param1} or param1,{type=x,value=param2} or param2,...)

  callmethod: 0=stdcall, 1=cdecl

  timeout: Number of milliseconds to wait for a result. nil or -1, infitely. 0 is no wait (will not free the call memory, so beware of it's memory leak)

  address: Address to execute

  {type,value} : Table containing the value type, and the value
    {
    type: 0=integer (32/64bit) can also be a pointer
          1=float (32-bit float)
          2=double (64-bit float)
          3=ascii string (will get converted to a pointer to that string)
          4=wide string (will get converted to a pointer to that string)
     
    value: anything base type that lua can interpret
    }

if just param is provided CE will guess the type based on the provided type


Example:

print( executeCodeEx(0, nil, "MessageBoxA", 0, {type=3,value="title"}, {type=3,value="content"}, 0) )