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

Alt, Ctrl and Shift keys are pressed while script execution

Class library usage, coding and language questions.

Alt, Ctrl and Shift keys are pressed while script execution

Postby dal » Fri Nov 19, 2010 2: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...
dal
 
Posts: 72
Joined: Thu Jun 24, 2010 9:59 am

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

Postby Ciege » Fri Nov 19, 2010 5: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
Ciege
 
Posts: 965
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA

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

Postby Support Team » Fri Nov 19, 2010 8: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
User avatar
Support Team
Site Admin
 
Posts: 4837
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

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

Postby dal » Tue Dec 14, 2010 12:00 pm

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...
dal
 
Posts: 72
Joined: Thu Jun 24, 2010 9:59 am

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

Postby Support Team » Tue Dec 14, 2010 12:50 pm

Hi,

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

Regards,
Tobias
Support Team
User avatar
Support Team
Site Admin
 
Posts: 4837
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 1 guest