Hi Dennis,
OK, I will basically suggest something like dunbarx.
It is always a good idea to explain the problem and logics that will lead to the solution to yourself in plain english!
Thanks to LiveCode you will be able to script it then 1:1!
Here we go:
1. We want to check for a condition periodically until the condition is true.
2. So when we check the condition and it is true, we enable that button (in your case) and are done
3. If the condition is NOT true, we check again after a certain amount of time
4. etc. until the conditon is true or the world stops spinning or the user quits the app
Now we script this (in the stack script):
1.
Code: Select all
on openstack
global XYZ
disable btn X
check4condition
end openstack
2. We actually check here:
Code: Select all
command check4condition
global XYZ
if XYZ <> empty then
enable btn X
ELSE ## = 3 and 4
send "check4condition" to me in 10 seconds
## or whatever seems to be a good interval
end if
end check4condition
As you can see, we almost tranlated step 1 to 4 1:1.
I strongly recommend this approach and NOT only to newbies!
Another example of this approach is on my website "simple_memory 1", find it here a little down the page:
http://www.major-k.de/xtalke.html
Hope this helps.
Best from germany
Klaus