Keys Method - Holding [ALT] while pressing twice the same key
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Keys Method - Holding [ALT] while pressing twice the same key
Hi guys,
I have an issue when holding a certain key and pressing another key multiple times, during the same combination.
At the moment, I have an object and I try to hold [ALT] while pressing [F7] twice, in order to change section in my desktop application. Here is the code in javascript :
var myObject = Aliases.Sys.MyObject; myObject.Keys("[Hold]~[F7][ReleaseLast][F7]");
As you can see, it shoul press and hold [ALT], the [F7], release [F7] and re-press it. The real behavior is that it hold [ALT], presses [F7] and keeps holding [ALT] until I have an error due to unexpected window opened (while [ALT] is hold, there is a window opened). I used debugging, and the code seems to be stuck in the Keys method.
Not sure what to do, any ideas ?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IF there is an additional window that comes up, potentially masking the window that you're interacting against, that is exactly the expected behavior. Unexpected window triggers when an action is attempted but there is another window that comes up.
If there is no need to specifically send these keystrokes to the specific window, you could simply send the Keys action to Sys.Desktop. That will simply interact with the desktop itself.
Alternatlvely, you could attempt to use LLPlayer.KeyDown and LLPlayer.KeyUp to simulate the desired actions.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sys.Desktop works perfectly, thanks a lot !
