Jump to content

Don't want to freeze my autoit Window


frankito
 Share

Recommended Posts

Hi

My problem is quite simple i guess.

I have just 1 form.

First action after form laucnhing is to download a large file.

But when script is downloading this files all other control are unreachable on my form (other button) till download is not finished.

How could i fix it ? (different thread for download ?)

Thanks

Link to comment
Share on other sites

thanks you very much for your answer, it works.

And now i got same question with another function "_INetSmtpMailCom"

I send a large file in the background using this function, but until it's not finished i can't do anything.

Basicaly i'll have the same problem with a couple of function, like a slow sqlite query, is there a way to start this function in a different thread to not freeze the window?

Link to comment
Share on other sites

Nope, these procedures are executed in your thread and not like InetGet which is executed in another thread. You can execute them in another process though, you can register your own message using _WinAPI_RegisterWindowMessage with your generated GUID or something and execute these tasks in another process and when the other processes finished their execution they can broadcast this message to your window to notify about the results. Much like process communication. If you require to share information which may be based on pointer like strings or structures, you should look into $WM_COPYDATA. Search the example forums.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...