Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Thu Jul 12, 2007 3:01 pm
I have written scripts that bounce through the dialogs using mouse clicks and Press Tabs to move from field to field, then using Send Character/Text> to enter the information. Also the process will always require a healthy dose of Wait>s to make it reliable. Usually an individual page can be filled out in a few seconds. This is nearly always faster than anyone can possibly type the info and is guaranteed accurate (or at least as accurate as the data the program is drawing from) so this has been a very good thing.
Recently, I got the idea that I could trim the input time by using SetControlText>. And indeed SetContolText> can input a whole pageful of information in the blink of an eye. This could save up to 5 seconds per page on some processes and if you input thousands of pages, this is quite significant. So using SetContolText> has the potential to be an even better thing.
Unfortunately, I'm having a problem with SetControlText> not working in my ERP software. It appears to work.... the fields all appear to contain the proper information... but when I pick the Ok button I get a message telling me that no information was found then the screen refreshes and displays all empty fields. This is exactly what will happen if I press the Ok button without entering any data. For whatever reason the software doesn't seem to know that information has been entered if the fields are populated using SetControlText>.
I realize that not all tools work for all situations, I'm hoping though that someone might have had a similar problem and found a way to resolve it.
Thank you,
Dick
-
pgriffin
- Automation Wizard
- Posts: 460
- Joined: Wed Apr 06, 2005 5:56 pm
- Location: US and Europe
Post
by pgriffin » Fri Jul 13, 2007 1:10 am
Dick,
What is your ERP? I have encountered a few ERP's which seem to ignore data sent directly via the Windows API. Curious...after your SetControlText> commands, are you using PushButton> to try to enter the data or are you Lclicking or hotkeys?
-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Fri Jul 13, 2007 1:15 pm
Thank you Paul.
The ERP is Global Shop Solutions.
I have a test script that populates the form then quits. I'm using my mouse to click on Ok. And I've also tried Tabbing to the button and pressing enter manually.
-
pgriffin
- Automation Wizard
- Posts: 460
- Joined: Wed Apr 06, 2005 5:56 pm
- Location: US and Europe
Post
by pgriffin » Fri Jul 13, 2007 2:10 pm
Will the Global Shop UI recognize the PushButton> command?
My guess is that it won't make a difference as to your problem, but worth a try so we can eliminate that method.
-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Fri Jul 13, 2007 3:21 pm
Yes, the PushButton> command works as does:
Press ALT
Send>s
Release Alt
The System Windows info for this object is:
Button "&Save"
-
pgriffin
- Automation Wizard
- Posts: 460
- Joined: Wed Apr 06, 2005 5:56 pm
- Location: US and Europe
Post
by pgriffin » Fri Jul 13, 2007 3:45 pm
Are you saying that if you use SetControlText> to populate the screen, then use PushButton> , the data is saved correctly?
-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Fri Jul 13, 2007 3:49 pm
Sorry for being nonspecific.
The Pushbutton command does push the button. I still get an error at that moment telling me no data was available to process.