Funtime60 Posted December 19, 2017 Share Posted December 19, 2017 I'm trying to run multiple programs, each oh which uses mouseclick at different locations. What happens if they call for the mouse at the same time? Does one get it first and the other one has to wait or do they both continue assuming that the mouse did what it was told to while only one actually does? Merging the programs is not an option so I really need to know what happens in this situation. Thank you for your time. Link to comment Share on other sites More sharing options...
Funtime60 Posted December 19, 2017 Author Share Posted December 19, 2017 I'm trying to run multiple programs, each oh which uses mouseclick at different locations. What happens if they call for the mouse at the same time? Does one get it first and the other one has to wait or do they both continue assuming that the mouse did what it was told to while only one actually does? Merging the programs is not an option so I really need to know what happens in this situation. Thank you for your time. Link to comment Share on other sites More sharing options...
Developers Jos Posted December 19, 2017 Developers Share Posted December 19, 2017 You even posted the topic twice. Have you tried what happens? My guess is that you have one mouse and the separate scripts will be fighting for control. Care to explain why one script is no option? What are you trying to automate? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ur Posted December 20, 2017 Share Posted December 20, 2017 I faced the similar issue earlier as the user launching two separete autoit automation exe files on the same machine same time. May be it is not the correct approach, but I followed the below one. Whenever an application trying to access the mouse control, I am checking for a file/registry and wait for till it's get deleted. If not there, it will create them and enter the execution. So I am using the registry/file as a lock for entering the mouse control and deletes it once the execution is completed. Other scripts also I implemented the same logic. Link to comment Share on other sites More sharing options...
RTFC Posted December 20, 2017 Share Posted December 20, 2017 22 hours ago, Funtime60 said: they both continue assuming that the mouse did what it was told to while only one actually does 1 hour ago, ur said: using the registry/file as a lock 1 hour ago, ur said: it is not the correct approach Using a mutex would be a more appropriate approach, see here and here. Earthshine 1 My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O 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