execute ingame command

Discuss the development of Lua addons for Ashita here.
Locked
gilles
Posts: 14
Joined: Sun May 15, 2016 1:53 pm

execute ingame command

Post by gilles » Mon May 23, 2016 3:25 pm

i can't find a way to send ingame command from addon
something like "/macro book set..."
gilles
Posts: 14
Joined: Sun May 15, 2016 1:53 pm

Re: execute ingame command

Post by gilles » Mon May 23, 2016 4:36 pm

got it :

Code: Select all

local xxx = AshitaCore:GetChatManager():ParseCommand('/echo xxx', 1);
User avatar
atom0s
Site Admin
Posts: 304
Joined: Sat May 14, 2016 5:13 pm

Re: execute ingame command

Post by atom0s » Mon May 23, 2016 8:40 pm

For addons you should use QueueCommand instead of ParseCommand to prevent race conditions with threading.
Lead Ashita Developer
Locked