Press and Hold KeyStrokes

Ask general questions here.
costamesakid
Posts: 94
Joined: Tue Jun 16, 2009 10:27 pm

Press and Hold KeyStrokes

Post by costamesakid » Thu Jan 28, 2010 9:42 pm

Is it possible to record a key sequence and have the keys pressed down for a period of time. Such as Ctrl+Alt+Delete to get to the reboot dialog?

When I record the sequence in Ranorex and play back, Ranorex will press Ctrl then release then press Alt then release, etc. Thanks

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

Re: Press and Hold KeyStrokes

Post by Ciege » Thu Jan 28, 2010 10:28 pm

Somthing like this?

Code: Select all

Keyboard.Press("{ControlKey DOWN}{Home}{ControlKey UP}");
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: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Press and Hold KeyStrokes

Post by Support Team » Fri Jan 29, 2010 10:08 am

Usually, if you record such a keystroke with Ranorex Recorder, it should generate a Keyboard Sequence action containing the exact same string ciege posted before.

However, Ctrl+Alt+Delete will most probably not work, because it is a special keyboard shortcut Windows won't allow to be simulated by an automation program for security reasons.

Regards,
Alex
Ranorex Support Team