|
Post by fredrick on Mar 23, 2020 20:26:15 GMT
I want it to keypress the F5 key when the pixel range changes... Any way of sorting this issue? Cheers
|
|
|
Post by zeak on Mar 23, 2020 22:12:15 GMT
Hi Fredrick,
First off welcome to the forum,
So one way I did the F5 key was to press recorder and pressed the F5 key, this gave me the below macro line that you should be able to use in your macro.
1 | 1482 | 350 | 2055 | Keypress f5 or this if you wish to only press the key with mouse movement and with 500 millisecond delay.
1 | X | X | 500 | Keypress f5 Help this helped, let me know if there is anything else you need help with.
Cheers, Zeak
|
|
|
Post by fredrick on Mar 24, 2020 23:47:51 GMT
Cheers for replying. no it doesn't help because I want the keypress to happen when the condition of the pixel changes. You cannot do this with just adding that line. The program does not detect the F1-F12 keys when you try to do add a condition and needs to be looked at.
|
|
|
Post by zeak on Mar 25, 2020 21:38:01 GMT
I'm not quite understanding why you cannot get it to work, when I do pixel range to trigger a keypress it works for me. Here is a clip of a simple macro to refresh the webpage if a range on it changes.
|
|
|
Post by zeak on Mar 25, 2020 22:59:02 GMT
Hi Steve , Can you please have a look at the following, I think I understand the problem now. when the ACTION of CONDITION IF statement is KEYPRESS function key, KEYPRESS reads it as the letter f and the number 5. I've tested three different methods and only when using ENTRY and not CONDITION does it work, As seen in the third test. (1) (2) (3) Action Keypress doesn't work the same as Entry Keypress.
|
|
|
Post by Steve on Mar 28, 2020 3:16:28 GMT
Hi Steve , Can you please have a look at the following, I think I understand the problem now. when the ACTION of CONDITION IF statement is KEYPRESS function key, KEYPRESS reads it as the letter f and the number 5. Action Keypress doesn't work the same as Entry Keypress. Hi Zeak, 'F5' with a upper 'F' will do a F5 as the function 5 key 'f5' with a lower 'f' will do a f5 as the text "f5" ...and yeah i did notice the KEYPRESS action does behave differently. The ACTION is just throwing everything out as text. Good pick up 1 | 1107 | 263 | 204 | Left Click 2 | RUN ACTION | KEYPRESS | F5 3 | RUN ACTION | WAIT SECONDS | 4 4 | 1107 | 263 | 1000 | Keypress F5
|
|
|
Post by Steve on Mar 28, 2020 3:33:30 GMT
Cheers for replying. no it doesn't help because I want the keypress to happen when the condition of the pixel changes. You cannot do this with just adding that line. The program does not detect the F1-F12 keys when you try to do add a condition and needs to be looked at. This will work: 1 | IF | PIXEL COLOR | At Location [X:1243 Y:410] | CHANGES::1::0::0 | RUN MACRO INLINE | D:\Macro\F5.mmmacro D:\Macro\F5.mmmacro1 | X | X | 0 | Keypress F5 In this example we look for any pixel change from a X and Y within the command prompt. When a pixel change is detected we load and run D:\macro\f5.mmmacro. That macro does the correct function key 'F5' press. Within a command window, F5 will paste the last command.
|
|