Hi,
right now it is in a button but it will need to be in a macro
You need to make up your mind either way.......they are not the same. If its in a button the code ends up in one chunk
but if it's in a macro it ends up in another.
int mInst = 0
That comes from the usage example and its in C++, disregard it. That's not how its used in Lua.
What is the "BOOL" and why is it needed?
BOOL means Boolean, so it is a variable type, either True or False, again its applicable to C++, C and C++ are very
strongly typed languages whereas Lua is not. It does not mean you can disregard it but its less important.
And the last and biggest how do I put this in a loop to keep looking until it is false.
I tried but I keep getting errors.
As I have posted and ordinary counting type loop wont work. You need to use a timer to generate a delay. Further
the timer or delay can place no burden on Mach because you are waiting for Mach to complete an API function, you
can't tell it to 'count to 1000' and expect it to complete its API call at the same time.
Have you looked at Daz's video? Have you coded a wxTimer? Where did you put the code?
Depending on how you wish this code to be used will alter where the code is placed and how its accessed, thus
I need to know if its a button OR a macro before I can help.
I notice in another of your threads you have some code that you are trying to use in two places, one as a button
and one as a macro. I think you should consider them as distinctly different.
Craig