I am writing a script to launch a windows application. It requires a username and password to login. My script sends the username and password to the application.
The application stores the username value on first time login. So when I try to login the second time, it fails by sending the same credentials again.
Can I clear out/reset the username column before sending the login credentials every time? How do I clear the contents of username column?
How to clear text in a textbox?
Moderators: Dorian (MJT support), JRL
Every application behaves slightly different, however these are things I would try.
Double click in the field (usually this highlights the text in the field), then do a Press Delete.
If that doesn't work, single click in the field, Press Home, press shift, press end, release shift (this should highlight all the text) then press delete.
Put small wait> statements in between all key presses to give the application time to react accordingly.
Double click in the field (usually this highlights the text in the field), then do a Press Delete.
If that doesn't work, single click in the field, Press Home, press shift, press end, release shift (this should highlight all the text) then press delete.
Put small wait> statements in between all key presses to give the application time to react accordingly.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
CTRL-A also does a select all. So once the field is focused (either via Press Tab or some other method), do:
Press CTRL
Send>a
Release CTRL
And then you can send your input.
Press CTRL
Send>a
Release CTRL
And then you can send your input.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
For the desired scenario I use the following commands:
These commands also delete the text of a textbox. But don't forget to give the focus to the textbox.
Code: Select all
Press End
Press Shift
Press Home
Release Shift
Press Del