What is the difference between " " and {SPACE} : Automation API

What is the difference between " " and {SPACE}

Class library usage, coding and language questions.

What is the difference between " " and {SPACE}

Postby Niels Seidler » Tue Apr 13, 2010 11:19 am

I want to maximize a window and found that the sequence: {Alt DOWN} {XKey}{Alt UP} opens the correct menu but the "X" key does not maximize the window.

This sequence does the trick: {Alt DOWN}{Space}{XKey}{Alt UP}

My questions then are:
1. Why does the first sequence not work?
2. When to use " " and when to use {SPACE}?
Niels Seidler
 
Posts: 1
Joined: Tue Apr 13, 2010 10:35 am

Re: What is the difference between " " and {SPACE}

Postby Support Team » Tue Apr 13, 2010 2:09 pm

The difference is that "{Key}" (e.g. "{Space}") does not change the state of modifier keys like Alt, Ctrl, or Shift, whereas " ", "A", or "@" change the modifiers state in order to really type that letter.
In other words: "A" will create an upper-case "A", no matter if you wrap it inside a "{Shift Down}{Shift Up}" or not. "{Akey}" will instead create a lower-case "a" if shift is not pressed and an upper-case "A" if you wrap it inside "{Shift Down}{Shift Up}" or have CapsLock on.

Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4845
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 0 guests