danpaul23 Posted January 20, 2007 Share Posted January 20, 2007 I'm wondering if I'm likely to run into problems if I try to run multiple AutoIt programs at the same time. I want to create a multi-thread type program where each program is running and the communicating through writing and reading different files. I.e. program 1 will write a certain line to a file, program 2 will check that file every 30 seconds and use that information and then leave information in another file for program 3 etc. Are there any general problems this might cause? The only thing I could think of is if multiple programs to access a file at the same time and read or write. I guess the chances of this happening at exactly the same time are pretty unlikely though. Link to comment Share on other sites More sharing options...
theguy0000 Posted January 20, 2007 Share Posted January 20, 2007 there is NO MULTITHREADING IN AUTOIT ...and will not be for a very long time. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Uten Posted January 20, 2007 Share Posted January 20, 2007 there is NO MULTITHREADING IN AUTOIT...and will not be for a very long time.Yes and if really read the top post you will see that the poster understands this. So he sugests a workaround and asks if that solution will sounds sound or will generate problems.So, back to the problem.Using Ini files or registry entries should work fine. If you want to make sure you don't get into trouble you could use a the CreateMutex and ReleaseMutex API in kernel32 when you update your variables in the file/registry to make sure there is no clashes. This is actually the same thing you should do when updateing shared memory in an application/language using multiple threads. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
theguy0000 Posted January 20, 2007 Share Posted January 20, 2007 oops, sorry. I just saw that he wanted a multithread type program and stopped reading from there :"> The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 20, 2007 Moderators Share Posted January 20, 2007 use a the CreateMutex and ReleaseMutex API in kernel32 when you update your variables in the file/registry to make sure there is no clashes.I hadn't even realized that I do this myself. I use OpenSemaphore to tell me which ones are actually active so I'm interacting with them properly. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Uten Posted January 21, 2007 Share Posted January 21, 2007 Several roads leading to Rome I guess.. If the registry or a ini file is used I would expect (but cant guarantee) that the OS does secure read/write operations. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now