Guys could really use some help, Just to give background I have literally no scripting experience,
I am wanting to create a macro that does the following. I have been told I can use readln to do the job but I have no idea how to do that. I am wanting to do the following:
I have a notepad file with 250 numbers on it. I need to create a macro that does the following.
copies the first line, set focus on a separate window, pastes it and then presses f1 and then repeats the process. how would I achieve this with readln
to Summarise
1.Notepad document copy line 1
2. set focus to window 1,paste and then press f1
3.copy line 2 and,
4.setofocus to window 1 paste and then press f1.
5.Repeat until all lines pasted
would be awesome if there is a way where I didn't even have to set focus and it pasted each
line and then pressed f1 after each iteration.
I look forward to hearing from you
Warm Regards
Mohammed Ali
Idiots guide to readln
Moderators: Dorian (MJT support), JRL
- Grovkillen
- Automation Wizard
- Posts: 1030
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Idiots guide to readln
I would use read file and separate the file contents using the new lines. Then iterate through this array.
Not a dummy explanation but :
Read file
Separate file contents by line
Use this array to iterate :
Let>k=0
Repeat>k
...
Until>k=array_count
Within this repeat loop you send the number to your window. Press F1, wait etc.
No need to go back and forth between the windows.
Not a dummy explanation but :
Read file
Separate file contents by line
Use this array to iterate :
Let>k=0
Repeat>k
...
Until>k=array_count
Within this repeat loop you send the number to your window. Press F1, wait etc.
No need to go back and forth between the windows.