|
Post by grigori on Aug 22, 2021 7:57:45 GMT
Hi All,
I was wondering if there was a way to do the following:
Record Macro and play it:
1st Run
Move Mouse Click and Drag Mouse to Select Text CTRL+C to Copy Move Mouse Click on Table Press TAB to go to Next Link Press Enter to Load It (Iframe window)
2nd Run
Move Mouse Click and Drag Mouse to Select Text CTRL+C to Copy Move Mouse Click on Table Press TAB 2 Times to go to Next Link Press Enter to Load It (Iframe window)
3rd Run
Move Mouse Click and Drag Mouse to Select Text CTRL+C to Copy Move Mouse Click on Table Press TAB 3 Times to go to Next Link Press Enter to Load It (Iframe window)
So with each loop of the full macro it adds one Tab Press to move down the list (The Reason for this is when focus leaves and re-enters the table with the links, the very_first link gets selected again).
Thank you in advanced for your help.
Regards
|
|
|
Post by philranger on Aug 24, 2021 20:13:40 GMT
Hello
You need to declare a variable to control a loop and do conditional jumps. This will become quite slow if there are many cells in your table. Are you sure you need to start at the beginning of the table every time?
|
|
|
Post by zeak on Aug 24, 2021 23:03:15 GMT
Hi Grigori, Here is the code I would use to do what you have asked but yes I agree with Phil, it sounds like there might be a better way of doing this. 1 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER%::0 2 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER1%::1 * | LOOP 2 | X | X | 1000 | Mouse Movement 3 | X | X | 1000 | Left Click Down 4 | X | X | 1000 | Left Click Release 5 | X | X | 1000 | Mouse Movement 6 | X | X | 1000 | Left Click 3 | FOR | I | = | %INTEGER% TO %INTEGER1% | NEXT 7 | X | X | 1000 | Keypress tab 5 | FOR | NEXT 8 | X | X | 1000 | Keypress enter 7 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER1%::+1 8 | IF | INTEGER VARIABLE | %INTEGER1% | GREATER THAN | 3 | STOP 10 | RUN ACTION | GOTO MACRO LINE | LOOP
You will need to change the X | X on the mouse movement and click lines to the X and Y of where you want your mouse, All "1000" on code are the time values you can change and I put in a loop stop function "3" that you can change to how many times you want this to loop. I did try the end of line loop function over the FOR but it couldn't use %INTEGER% as the loop count.
|
|
|
Post by zeak on Aug 24, 2021 23:31:31 GMT
I did try the end of line loop function over the FOR but it couldn't use %INTEGER% as the loop count. Sorry looks like I did it wrong first time I tried, you can use end of line loop with %INTEGER%. 1 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER%::1 * | LOOP 2 | X | X | 1000 | Mouse Movement 3 | X | X | 1000 | Left Click Down 4 | X | X | 1000 | Left Click Release 5 | X | X | 1000 | Mouse Movement 6 | X | X | 1000 | Left Click 7 | X | X | 1000 | Keypress tab | loop %INTEGER%::100 8 | X | X | 1000 | Keypress enter 9 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER%::+1 10 | IF | INTEGER VARIABLE | %INTEGER% | GREATER THAN | 3 | STOP 11 | RUN ACTION | GOTO MACRO LINE | LOOP Thinking further on a better way to do this, could you windows tab or windows select to the table and just use a down arrow key to move to next line?
|
|