View previous topic :: View next topic |
Author |
Message |
mforkner
Joined: 04 Aug 2004 Posts: 78
|
Posted: Wed May 11, 2005 9:11 pm Post subject: Application Interface Component |
|
|
There is no implementation for a {SPACEBAR} command in the Application Interface Component.
The spacebar key is useful many times, as some applications will see a spacebar keystroke as a button press instead of an enter key keystroke as a button press, and sometimes it is necessary to send Xnumber of spacebar keystokes in a conditional situation.
Also, I like the way that an unknown command in the braces prints in the targe app like regular keystrokes -- it exposes the error immediately!
I'd like to add a {SPACEBAR} command to my wish list for the Application Interface Component. |
|
Back to top |
|
|
CodeMorphis
Joined: 02 Dec 2003 Posts: 252
|
Posted: Wed May 11, 2005 10:19 pm Post subject: |
|
|
To send a SPACEBAR keystroke simply add the " " character.
i.e. add spaces as arguments to the "Keys" service.
Hope that this helps. |
|
Back to top |
|
|
mforkner
Joined: 04 Aug 2004 Posts: 78
|
Posted: Thu May 12, 2005 4:40 pm Post subject: Spacebar |
|
|
Sending spaces works fine, I should clarify.... sending a space to a wordprocessor works fine.
If a button has focus, most Windows apps will treat a SPACEBAR keystroke just like an ENTER keystroke, and will depress the button with the focus. This does not happen by simply sending a " " keystroke to a button with focus.
I will experiment some more. |
|
Back to top |
|
|
CodeMorphis
Joined: 02 Dec 2003 Posts: 252
|
Posted: Fri May 13, 2005 3:54 am Post subject: |
|
|
There is no difference between the action of the user pressing the spacebar key and sending the " " code via the "Keys" service. How are you giving the target button focus? In many apps, simply positioning the mouse cursor over a button does not give it input focus. Many apps require that you navigate through the UI controls with the arrow keys (or page up/down keys). Then pressing the spacebar will activate the currently selected button. If you are already doing this and it is not working then it is likely that it is a timing issue. Try pausing after setting the appropriate focus and before sending the spacebar code.
Hope this helps you. |
|
Back to top |
|
|
mforkner
Joined: 04 Aug 2004 Posts: 78
|
Posted: Sat May 14, 2005 11:52 am Post subject: Button Focus |
|
|
I am giving the button focus by tabbing to it, so that the button is highlighted by the surrounding dots. By then pressing the spacebar the button depresses.
I have updated my keystroke automation tool to include pre and post send delays to allow the application to recieve focus, then send keystrokes, then pause to allow xfer, then return focus to previous app.
Will let you know how this works after this coming Monday 05/16/2005. |
|
Back to top |
|
|
CodeMorphis
Joined: 02 Dec 2003 Posts: 252
|
Posted: Sat May 14, 2005 4:30 pm Post subject: |
|
|
OK, please feel free to post your results in the case that you require more assistance. |
|
Back to top |
|
|
|