Alt, Ctrl and Shift keys are pressed while script execution

Class library usage, coding and language questions.
dal
Posts: 72
Joined: Thu Jun 24, 2010 8:59 am

Alt, Ctrl and Shift keys are pressed while script execution

Post by dal » Fri Nov 19, 2010 1:18 pm

Hi Team,

While script execution, we have observed that the keyboard keys like ALT / CTRL / SHIFT was pressed.
Because of this the unexpected script execution is getting performed.

If we hit those keys again (manually) the control is getting released.
(Observed this behavior very randomly)

Can you please suggest, why/where there is a disconnect?

Regards,
Dal...

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Alt, Ctrl and Shift keys are pressed while script execution

Post by Ciege » Fri Nov 19, 2010 4:08 pm

Is there somewhere in your code where you are pressing those keys? Maybe using a keydown but never using a keyup? That is such a broad question that without seeing your code or running it in debug it would be extremely difficult to answer that question.
That being said, my code uses the keyboard and combination keys quite often and I have never seen an instance where a key was left in a keydown state unless I wanted it to be.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Alt, Ctrl and Shift keys are pressed while script execution

Post by Support Team » Fri Nov 19, 2010 7:23 pm

Do you use the debugger to run your automation executable and do you have some breakpoints that the execution is halted in? If you have a Keyboard.AbortKey set and you happen to hit any of these keys when halting in a breakpoint, the keys may get stuck. That's the only combination of causes we currently know to reproduce that issue (and unfortunately we have not found a way to fix this issue, yet).

Regards,
Alex
Ranorex Team
.
Image

dal
Posts: 72
Joined: Thu Jun 24, 2010 8:59 am

Re: Alt, Ctrl and Shift keys are pressed while script execution

Post by dal » Tue Dec 14, 2010 11:00 am

Hi Alex,

Yes we do use some breakpoints while executing the scripts, even the Program.vb has the following statement:

Code: Select all

Keyboard.AbortKey = System.Windows.Forms.Keys.Pause
If I delete this statement from the script is there any impact while executing the script / executing the script in debug mode?

Regards,
Dal...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Alt, Ctrl and Shift keys are pressed while script execution

Post by Support Team » Tue Dec 14, 2010 11:50 am

Hi,

if you delete this line of code the abort key simply won't work any longer for your project.

Regards,
Tobias
Support Team
.
Image