MPQC has asked for the wisdom of the Perl Monks concerning the following question:
Basically, here's what I've got so far. I've got a perl script which will be run remotely, by many networked computers simultaneously (dozen+). I've been testing the script to verify that it works - and it works great, at least for one computer. I haven't tested multiple computers as I don't have them available to me as of right now (and since it's a race condition, even if I run the tests it may not even show up). So, what I'd like to know is if running the following code would have the possibility of a race condition (send the keys to the wrong window):
... (unnecessary code) my @windows = FindWindowLike(0, "$uniquename", ""); for (@windows) { SetForegroundWindow($_); SendKeys("^{CAPS}"); } ... (unnnecessary code)
Each window being tested will have a unique name, so FindWindowLike will be returning exactly the window I want (silly for loop, I know). So could it send it to the wrong window? If so, what could one way be of fixing this, perhaps WaitWindow?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is GUITest SetForegroundWindow/Sendkey thread safe?
by BrowserUk (Patriarch) on Mar 26, 2014 at 16:54 UTC | |
by MPQC (Initiate) on Mar 26, 2014 at 17:40 UTC | |
by BrowserUk (Patriarch) on Mar 26, 2014 at 20:47 UTC | |
by GrandFather (Saint) on Mar 26, 2014 at 20:45 UTC | |
|
Re: Is GUITest SetForegroundWindow/Sendkey thread safe?
by Anonymous Monk on Mar 26, 2014 at 23:35 UTC |