Jump to content
Sign in to follow this  
ironmanexe

Complex loops

Recommended Posts

ironmanexe

Lets say that your program was one gigantic complex loop. Now, the program is absicly done and you want to add a gui. But the gui requires its own loop. And the main loop only completes every so often. How can we make the gui refresh and also obtain values from the gui's controls.

I know someone will say to post the code but id rather not release this and also dont belive it's finished enough for you to see the full architecture.

_edit_

Would OnEvent Mode Suffice? How long does this pause the script, just long enopugh to complete its function?

Edited by ironmanexe

Time + Effort = Constant

Share this post


Link to post
Share on other sites
Valuater

no way to help without seeing code... sorry

you can go to "rentacoder.com" and pay someone who you can trust

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites
sohfeyr

Lets say that your program was one gigantic complex loop. Now, the program is basically done and you want to add a gui. But the gui requires its own loop. And the main loop only completes every so often. How can we make the gui refresh and also obtain values from the gui's controls.

I'm just pulling this out of a hat, but you might try:

AdlibEnable("MajorLoopContents")
Func MajorLoopContents()
    AdlibDisable()
    ; Major loop code
    AdlibEnable("MajorLoopContents",1)
EndFunc

While GUIGetMsg() <> $MSG_EXIT
    ; your GUI
WEnd

I haven't tried this myself - it appears to be an abuse of the Adlib functions - but it's simple enough to be worth a try...

Share this post


Link to post
Share on other sites
Azu

Lets say that your program was one gigantic complex loop. Now, the program is absicly done and you want to add a gui. But the gui requires its own loop. And the main loop only completes every so often. How can we make the gui refresh and also obtain values from the gui's controls.

I know someone will say to post the code but id rather not release this and also dont belive it's finished enough for you to see the full architecture.

_edit_

Would OnEvent Mode Suffice? How long does this pause the script, just long enopugh to complete its function?

Try using AdlibEnable, that's what I do in my script, where I have a bunch of stuff that happens in a big loop basically, but I have some other code that I want to keep running over and over throughout the whole thing, AdlibEnable will do this. :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.