User Tools

Site Tools


en:actions:actionkey

Differences

This shows you the differences between two versions of the page.


Previous revision
en:actions:actionkey [2021/02/13 11:23] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Key ======
  
 +This action allows you to simulate a key press or release. This action should not be used to write text, to do so you should rather use the  [[en:actions:ActionWriteText|Write text]] action.
 +You could use this action to trigger a keyboard shortcut (F5 to refresh a Web page, Escape to exit a dialog box...) or another feature.
 +
 +===== Standard parameters =====
 +==== Input parameters ====
 +== Key ==
 +The key to press. To set the value of this field you only have to press the wanted key.
 +== Action ==
 +The action that should be performed:
 +  * Press and release: a simple keypress.
 +  * Press: the key is maintained pressed until another action stops it or until the execution ends.
 +  * Release: the key is released if it was previously pressed.
 +== Amount ==
 +The amount of key presses to simulate. [//Added in Actionaz 3.5.0.//]
 +
 +===== Advanced parameters =====
 +== Type ==
 +The keyboard type to use. Windows only.
 +  * //Win32//: the standard Windows keys.
 +  * //DirectX//: the DirectX keys, choose this if the regular keys doesn't work.
 +
 +== Press/Release pause ==
 +The amount of time to wait before releasing a pressed key.
 +
 +===== Exceptions =====
 +  * [[en:actions:exceptions#Bad parameter|Bad parameter]]
 +  * [[en:actions:exceptions#Code error|Code error]]
 +  * [[en:actions:exceptions#timeout|Timeout]]
 +  * [[en:actions:actionkey#simulation_failed|Simulation failed]]
 +  * [[en:actions:actionkey#invalid_action|Invalid action]]
 +
 +==== Simulation failed ====
 +<BOOKMARK:simulation_failed>
 +
 +This exception is thrown when the simulation failed.
 +  * Default action: stop the script execution
 +
 +==== Invalid action ====
 +<BOOKMARK:invalid_action>
 +
 +This exception is thrown when the action is invalid.
 +  * Default action: stop the script execution