I really need spacebar to work with XType or otherwise (Workaround availabe)

Does anyone know how this works or otherwise when this will be available?

1 Like

KEY_SPACE for XType should be available in a few weeks. Meanwhile you can use use XRun as workaround..

Update: 2020/8/8: KEY_SPACE is now available. But this post is still worth reading because:

  • It shows how to use XRUN
  • The “external sendkeys” method shown below is still useful if you need to simulate some exotic keystroke combinations that are not supported out of the box by the RPA software.

XRUN and Sendkeys

Here is a Windows solution (Scroll down for Mac and Linux solutions):

With XRun you can call for example a VBS script with sendkeys " " (<- space!) inside:

Here we use the XRun command to run a VBS script with sendkeys inside. The screencast also shows the difference between sending text strings like XTYPE | abc and explicitly simulating keyboard key presses with XTYPE | {KEY_D}{KEY_E}

vbs sendkeys script:

' Start
Set WshShell = WScript.CreateObject("WScript.Shell")

' Type in Hello World
WshShell.SendKeys "Hello World!"
WshShell.SendKeys "{ENTER}"

test macro:

{
  "Name": "sendkeys with VBS",
  "CreationDate": "2020-2-24",
  "Commands": [
    {
      "Command": "open",
      "Target": "http://keyboardchecker.com/",
      "Value": ""
    },
    {
      "Command": "bringBrowserToForeground",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "slow",
      "Value": "!replayspeed"
    },
    {
      "Command": "XType",
      "Target": "ab c",
      "Value": ""
    },
    {
      "Command": "XType",
      "Target": "${KEY_D}${KEY_E}",
      "Value": ""
    },
    {
      "Command": "XRun",
      "Target": "c:\\test\\key.vbs",
      "Value": ""
    }
  ]
}

Mac and Linux Sendkey solutions

2 Likes

Upcoming new keys for XType:

  • Home, End, Insert
  • Space bar
  • Mouse scroll up/down
  • Mac: Full Key_Cmd support again. Recent macOS updates broke this features partly, currently works only for some combinations. (Update 2020/8/2: CMD key seems to work again :slight_smile: )

Any other key missing? If so, please let us know!

1 Like

Please include OPTION key for Mac as well.

Please include OPTION key for Mac as well.

Ok. As current workaround for MacOS please use XRUN with the free cliclick tool.

Cliclick Example:

  • kp: space will press the command key and the option key (and will keep them down until you release them with another command)
  • kd:cmd,alt will press the command key and the option key (and will keep them down until you release them with another command)

Home, End and Space bar support was added with V2020-8.

Mouse scroll up/down is also inside the new XModule, but it needs another RPA core update before it can be used.

Hello, I just tested Xtype | ${KEY_SPACE} on XModule version v1.0.20 and it does not seem to work. I am testing on a Windows 7 machine.

Did you use the new V5.88 release? (Currently available for Firefox only)

Working like a charm, see the space bar in green is clicked from xmodules.

I use Windows 7 too.

Macro code

{
  "Name": "AAA",
  "CreationDate": "2020-8-10",
  "Commands": [
    {
      "Command": "bringBrowserToForeground",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "XType",
      "Target": "${KEY_SPACE}",
      "Value": ""
    }
  ]
}

Image

Ahh, that explains it. No, I was using the latest version for Chrome (v1.0.20).

Hope to XType be able to add period (.) (:)(/) keys