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