Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

If value goes down

$
0
0

Hey um, i don't really know how to explain this without confusing you guys so i'll give it my best shot... i hope that someone knows a solution to this; as again this is just me testing my ability with autoit.

 

I have a form that i made and the value goes down randomly (for the sake of testing) and when it goes down to whatever value randomly, it will shoot back up to 100% eventually and repeat the process at a random intervel. 

(I guess you could think of it like a health bar? Not sure if thats the perfect description.)

 

 

I have a "while" loop going on where it constantly checks that value and make sure it is 100%. 

 

If it is 100% it will just set a label or something to "Full"  and if it is not 100%, it will go and say "Lowered" on that label.

 

It will say "Lowered" until it is 100%, obviously.

 

but thats not what i want; i want it to say decreased for a temporary amount of time like 1 second, or 2 seconds and then just wait for the value to go down again... but i have absolutetly NO idea how i would go about doing this , and i'm dang determinded to do this somehow. 

 

If anyone knows how i would go about doing this please help. 

 

 
 
 
While 1 Detect() Wend Func Detect() $read = GuiCtrlRead($Label1) If $read = 100 Then GuiCtrlSetData($Label2,"Full") Else GuiCtrlSetData($Label2,"Decreased!") EndIf  Endfunc

For the sake of this i didn't bother adding the includes and stuff since i know that's well.

I'm hoping someone has the intelligence to help me with this


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>