Hi
Anyone able to help me. I'm a beginner and had a look on the forums, but not found anything as simple as me!
Every day I will be taking about 30 lines of text (either from excel, word or notepad, or an RSS feed, (using only one format, whatever is easiest).
I will then need to take each line of text and copy it, then paste into a subroutine in a different program.
I will then run a subroutine with this phrase,(I have this bit covered) and then will want to get the next phrase and do it again.
Can anyone help? if I cant get free help, I can create a scriptlance project for this. im desperate!
Beginner - need help for getting data from excel/word
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 3
- Joined: Fri Jan 14, 2011 7:32 pm
Something like this should get you started.
Code: Select all
Let>k=1
Label>start
//Read a plain ASCII file created with notepad
ReadLn>c:\temp\test.txt,k,line
If>line=##EOF##,finish
//Put contents of line on clipboard
PutClipBoard>line
//Paste the value from the txt file into some field
//in another program which is currently running
SetFocus>Put your application title here
Wait>0.5
//fill in the x and y coordinates for your other program
MouseMoveRel>X,Y
//Click in the field
LClick
Wait>0.5
//Paste in the value stored on the clipboard
Press Ctrl
Send>v
Release Ctrl
//Get the next line in the txt file
Let>k=k+1
Goto>start
Label>finish
-
- Newbie
- Posts: 3
- Joined: Fri Jan 14, 2011 7:32 pm
wow, that is great. thank you so much.
One final question - not quite related to this.
I use the image capture feature to progress through a few screens. Sometimes, for whatever reason - it doesnt work and the screen will just stay the same in my process. Is there any way to add a line that says:
If the screen stays exactly the same for more than 5 minutes, then gotok=1
Label>start
//Read a plain ASCII file created with notepad
ReadLn>c:\temp\test.txt,k,line
If>line=##EOF##,finish
//Put contents of line on clipboard
PutClipBoard>line
//Paste the value from the txt file into some field
//in another program which is currently running
SetFocus>Put your application title here
Wait>0.5
//fill in the x and y coordinates for your other program
MouseMoveRel>X,Y
//Click in the field
LClick
Wait>0.5
//Paste in the value stored on the clipboard
Press Ctrl
Send>v
Release Ctrl
//Get the next line in the txt file
Let>k=k+1
Goto>start
Label>finish
[/code][/quote]
One final question - not quite related to this.
I use the image capture feature to progress through a few screens. Sometimes, for whatever reason - it doesnt work and the screen will just stay the same in my process. Is there any way to add a line that says:
If the screen stays exactly the same for more than 5 minutes, then gotok=1
Label>start
//Read a plain ASCII file created with notepad
ReadLn>c:\temp\test.txt,k,line
If>line=##EOF##,finish
//Put contents of line on clipboard
PutClipBoard>line
//Paste the value from the txt file into some field
//in another program which is currently running
SetFocus>Put your application title here
Wait>0.5
//fill in the x and y coordinates for your other program
MouseMoveRel>X,Y
//Click in the field
LClick
Wait>0.5
//Paste in the value stored on the clipboard
Press Ctrl
Send>v
Release Ctrl
//Get the next line in the txt file
Let>k=k+1
Goto>start
Label>finish
[/code][/quote]