Guest jocasio Posted March 8, 2005 Share Posted March 8, 2005 Hey All: I'm very new to AutoIT and I'm trying to create a Script that copies data from an excel spreadsheet, loads the data into variables, then runs an application to fill in the data. This is a Loan entry program we have and I'm trying to automate the entry of data. So my excel spreadsheet has about 20 columns. I'm able to load the data into the variables fine, but when I go to the applications to load the customer info, when I perform a oAutoIT.Send variableName, it sends the data, but also seems to send a Tab. I actually have to tab through and send each of the variables, so this would not be a problem if after sending each variable, it tabbed. The only problem is it's not consistant with how it does this. Is there a way (besides setting the flag to 1 - I tried that already) to stop the tabbing. Interesting enough the vbscript shell.sendkeys does the same thing. I also tried copying the variable back onto the clipboard and then pasting, but it's empty. Any help would be greatly appreciated Thanks jocasio Link to comment Share on other sites More sharing options...
bshoenhair Posted March 8, 2005 Share Posted March 8, 2005 Excel VBA is the best solution for any Excel spreadsheet related tasks. Com is another way which is included in jpm latest beta. I prefer Excel VBA because it is faster than Com and is more user friendly. Link to comment Share on other sites More sharing options...
Guest jocasio Posted March 9, 2005 Share Posted March 9, 2005 Thanks for the reply. I'm able to copy the data to to my variables, the problem isn't with the excel spreadsheet however. It's when I activate my third pary application. When I send each of the variables to the textboxes in this app, there seems to always be a TAB somewhere. I just want to be able to send just the data and no other characters (carriage returns, etc), and want to manually tab through the fields. We are currently using an application called Macro Express, but it's not robust enough. THanks jocasio Link to comment Share on other sites More sharing options...
Blue_Drache Posted March 9, 2005 Share Posted March 9, 2005 (edited) Does the AutoItX.dll contain a StringStripWS()/StringStripCR() function? I can't open it up right now, I don't have that particular version with me. Edit: Nevermind. I do have the AutoItX.dll help file. No, it doesn't. Does VB have this ability to strip out whitespace and carrage returns? I think the tab is considered a whitespace character. Edited March 9, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
bshoenhair Posted March 9, 2005 Share Posted March 9, 2005 (edited) @jocasio I assume you are using AutoItX.dll right Just remove the last char sString = Left(sString ,Len(sString)-1) Instead of using "Send" I would use "ControlSetText" or "ControlSend". NOTE: copying data to the clipboard is not the best solution, is not fail proof and is slow. The best solution is to use Excel VBA with AutoItX.dll and you will not have this issue. Edited March 9, 2005 by bshoenhair Link to comment Share on other sites More sharing options...
Guest jocasio Posted March 10, 2005 Share Posted March 10, 2005 bshoenhair: Thanks for the reply. Unfortunately I cannot use the ControlSend because my controls do not show up having ids in the AutoIT window Info viewer. I am trying the VBA and it seems to be working so far. I will continue this and let you know how it goes. THanks jocasio Link to comment Share on other sites More sharing options...
Guest jocasio Posted March 10, 2005 Share Posted March 10, 2005 PS: What is jpm latest beta Thanks jocasio Link to comment Share on other sites More sharing options...
bshoenhair Posted March 10, 2005 Share Posted March 10, 2005 Go Herehttp://www.autoitscript.com/forum/index.ph...topic=9202&st=0 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now