|
Post by zeusthunderer on Jun 23, 2019 19:10:44 GMT
Can I use File Count to create an %integer%, eg. 967 files? Then use that integer to Keypress Down 967 times?
|
|
|
Post by Steve on Jun 29, 2019 4:17:48 GMT
Hi, I'm not exactly sure what your trying to achieve but I can have a guess. Your want the value of how many files are in a directory to be stored in an integer variable and then that variable to be used for a KEY DOWN loop? Here is what you will need: 1 | FOR | EACH | FILE IN | D:\Macro\test | DO 2 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER%::+1 3 | FOR | NEXT 4 | IF | WINDOW TITLE | hello.txt - Notepad | EXIST | SELECT WINDOW BY NAME | hello.txt - Notepad | ELSE | 7 | RUN ACTION | | | | EXIT 5 | FOR | I | = | 1 TO %INTEGER% | NEXT 6 | X | X | 100 | Keypress DOWN 7 | FOR | NEXT - for each file in the folder d:\macro\test do
- the action to define integer to equal the value of integer +1 (integer+=1)
- do this for loop
- if the window title hello.txt - Notepad does exists then select that window into focus. If it does not exists then exit the macro.
- for I is 1 to the value of integer (integer currently is the value of the count of files we declared above)
- do a kepress down
- do this for loop until we reach the count of integer
|
|
|
Post by zeusthunderer on Jun 29, 2019 6:22:14 GMT
Thank you so much Steve, I managed to figure out an easier method using ctrl+C, ctrl+V. But I hope your explanation helps others.
|
|