November 26, 20187 yr Trying to click a button for a certain amount of times in a quester profile, i currently have <QuestsSorted Action="RunMacroLua" NameClass= ("/click MyButtonNameGoesHere") But i want to loop it for 100 times.
November 26, 20187 yr Hello, Run C# code: for (int i = 0; i < 100; i++) { wManager.Wow.Helpers.Lua.RunMacroText("/click MyButtonNameGoesHere"); Thread.Sleep(100); // wait 100 ms before next run, you can remove or edit this line. }
November 26, 20187 yr Author Could i do something like this? for (int i = 0; i < 100; i++) { wManager.Wow.Helpers.Lua.RunMacroText("/click MyButtonNameGoesHere1"); wManager.Wow.Helpers.Lua.RunMacroText("/click MyButtonNameGoesHere2"); Thread.Sleep(100); // wait 100 ms before next run, you can remove or edit this line. }
November 26, 20187 yr Author for (int i = 0; i < 100; i++) { wManager.Wow.Helpers.Lua.RunMacroText("/run if atbmi==nil then atbmi=1 end atbni=GetInboxNumItems() if atbmi>atbni then atbmi=1 end atbit=GetInboxInvoiceInfo(atbmi) if atbit=="seller_temp_invoice" then GetInboxText(atbmi); DeleteInboxItem(atbmi) else atbmi=atbmi+1 end"); wManager.Wow.Helpers.Lua.RunMacroText("/run if atbmi==nil then atbmi=1 end atbni=GetInboxNumItems() if atbmi>atbni then atbmi=1 end atbit=GetInboxInvoiceInfo(atbmi) if atbit=="seller_temp_invoice" then GetInboxText(atbmi); DeleteInboxItem(atbmi) else atbmi=atbmi+1 end"); Thread.Sleep(100); } Ok so i got the one you helped me with, now im trying to add this in, but i realize now it is in the RunMacroLua section, ive tried changing wManager.Wow.Helpers.Lua.RunMacroText to wManager.Wow.Helpers.Lua.RunMacroLua. Unfortunately it doesnt work, i looked in Visual Studio and all i can find is wManager.Wow.Class.QuestAction.RunMacroLua, but it keeps giving me a error that it cannot find it, is there another way i can use this RunMacroLua with the loop?
November 26, 20187 yr https://marsbars.gitlab.io/unoffical-wrobot-api-docs/api/wManager.Wow.Helpers.Lua.html#wManager_Wow_Helpers_Lua_LuaDoString_System_String_System_Boolean_ Using your code: for (int i = 0; i < 100; i++) { wManager.Wow.Helpers.Lua.LuaDoString("if atbmi==nil then atbmi=1 end atbni=GetInboxNumItems() if atbmi>atbni then atbmi=1 end atbit=GetInboxInvoiceInfo(atbmi) if atbit==\"seller_temp_invoice\" then GetInboxText(atbmi); DeleteInboxItem(atbmi) else atbmi=atbmi+1 end"); wManager.Wow.Helpers.Lua.LuaDoString("if atbmi==nil then atbmi=1 end atbni=GetInboxNumItems() if atbmi>atbni then atbmi=1 end atbit=GetInboxInvoiceInfo(atbmi) if atbit==\"seller_temp_invoice\" then GetInboxText(atbmi); DeleteInboxItem(atbmi) else atbmi=atbmi+1 end"); Thread.Sleep(100); } Edited November 26, 20187 yr by Marsbar
Create an account or sign in to comment