qwert Posted September 4, 2014 Share Posted September 4, 2014 Request for Advice I’m seeking a straightforward way to signal the active copies of a GUI so that they take a particular action at the end of their next “cycle”... the cycle being based on user entries and user-initiated actions. (As a basis for communicating, I use WinList() to build a roster of the active WinIDs.) The simplest way (that I know of) is probably to set up each GUI to respond to a common hotkey. The controlling script can then sequentially activate each GUI and Send([def’d key]). Upon receiving the key, a script would latch an appropriate flag. I'll mention: I've never been a fan of hotkeys in runtime situations. But it's a method I'm familiar with. I'll also mention that these are independent GUIs, not parent/child. In the best of all worlds, I’d like to be able to fetch a current value from each active GUI. But I’ve looked at what’s involved in methods like Mailslot, Named Pipes and WM_COPYDATA, and I just can’t justify adding such complexity. Is there a simple method that I’m missing? Thanks in advance for any advice. Link to comment Share on other sites More sharing options...
qwert Posted September 5, 2014 Author Share Posted September 5, 2014 I ran into a solid wall with the Hotkey alternative: If two AutoIt scripts set the same hotkeys, you should avoid running those scripts simultaneously as the second script cannot capture the hotkey unless the first script terminates or unregisters the key prior to the second script setting the hotkey. I'm back to square one on finding a simple method. Any help will be appreciated. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 5, 2014 Moderators Share Posted September 5, 2014 Without seeing your code it is nigh impossible to give you more than broad suggestions. That said, if you're looking more for inter-process communication, I would look at Trancexx's MailSlot UDF in the Examples forum. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
qwert Posted September 5, 2014 Author Share Posted September 5, 2014 Thanks for your response. For a few hours, my code consisted of a WinActivate + WinWaitActive + Send("{Ins}") sequence at the point of transmitting a request ... and then defining HotKeySet("{Ins}") as a universal "receiver" in each active GUI. But as I said, the brick wall is the limitation of one definition of the same hotkey at a time. Currently, I'm looking at the possibility of using _SendMessage in some manner. The msdn description of application messages sounds promising: Application-Defined Messages An application can create messages to be used by its own windows or to communicate with windows in other processes. If an application creates its own messages, the window procedure that receives them must interpret the messages and provide appropriate processing. Having never seen an example of this, it's taking time to pick through the possibilities. http://msdn.microsoft.com/en-us/library/windows/desktop/ms644927%28v=vs.85%29.aspx#app_defined 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