Jump to content

Delay/prevent script instance from interacting with 3rd party program controls?


Bagel
 Share

Recommended Posts

I have a project I'm working on whereby multiple instances of a script need to be running each of which need to be able to interact with the controls of a non-Autoit GUI. This period of interaction is relatively quick but if more than one script instance attempts to activate controls on the GUI simultaneously the results are undesirable. Is there any way that one script can delay or lock out another from having access to the GUI controls until it's work is completed? Obviously, I have access to the code for the scripts but I do not have access to the code for the GUI.

 

Thanks for any help!

Link to comment
Share on other sites

5 hours ago, argumentum said:

You mean a mutex, not a semaphore. They are not the same thing (see: " a binary semaphore is NOT protecting a resource from access. The act of Giving and Taking a semaphore are fundamentally decoupled."). Funny how people keep confusing the two. And if you use a mutex, you don't need IPC, as the mutex name is globally unique; as long as all instances of the script use the same name, any instance of the script just needs to query whether that mutex is free.

Edited by RTFC
Link to comment
Share on other sites

8 hours ago, RTFC said:

You mean a mutex, not a semaphore.

nope, I typed semaphore and the link is a search of "semaphore vs. mutex". It was not very clear to me his code or trend of thought. I don't get why run another while the original is running, so, I basically meant "read up in what are the possibilities and come up with a simple solution on your own" and I thought at the time that the post was short and sweet :)

PS: ..is so common for the eager to help, ( you, me, etc. ), to heat up a discussion while the OP is not even in sight. ...most times not even a sampler of the code.
I see the value of your clarification but at the time I thought I was the "first responder", but @Subz posted sooner ( with 
basically what is your proposed solution ).
I, at times entice ppl, into an expanded dialog to dig for more information, hence my vague and not quite correct ( but not necessarily wrong ) response .
...then again, "show me the code !" :D 
..I aim to help understanding, not necessarily presenting an exact solution as they ( all of 'em ! ), come back with "give me an answer, I'm in a hurry", as in a loop.

@Bagel, I'm taking with @RTFC, so...., don't read this ;) ..but do share what you've done to solve your problem.

Edited by argumentum

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

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...