|
Post by Kyle on Aug 17, 2021 1:49:26 GMT
Hiya Guys,
I wasnt able to find anything about this in other posts, but im having issues with 'an unexpected error has occured Index was outside the bounds of the array.' and I'm not entirely sure what the issue is
08/17/2021 02:26:21.32 AM Playback error: 1 | IF | DETECT IMAGE | image path C:\Users\tustaink\Desktop\Macro Root\Assets\Ticket Field Titles PNG\SubCatagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | SUCCESS::Youre not a failure::0::Critical - an unexpected error has occured Index was outside the bounds of the array.
Things ive already tried - a shorter save location for the image - I have recreated the bmp with the pixel range tool - The 'image' I'm searching for is a word on a webpage - i have tested this separately with an actual image (spotify icon) - I have a triple display setup so I'm not sure if that's affecting it -ie X position exceeds maximum expected - I have tried using the within range functionality - The search has been successful on 2 runs using the below, but it is also coming up with the same error - Ive googled it (generically) and it mentions invalid formatting, or something being missing but this is using the 'Add conditon' tool
1 | IF | DETECT IMAGE | image path C:\Users\tustaink\Desktop\Macro Root\Assets\Ticket Field Titles PNG\SubCatagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | SUCCESS::Youre not a failure::0::Critical
The below is what im trying to get to work for a couple of hours now but i keep getting 'Index was outside the bounds of the array', any ideas?
1 | RUN ACTION | MOUSE TO IMAGE | image path C:\Users\tustaink\Desktop\Macro Root\Assets\Ticket Field Titles PNG\SubCatagory.bmp::at 2640 600 90 460::match quick::move mouse yes::offset +250 +0
2 | RUN ACTION | MESSAGE PROMPT | %mouse_x% %mouse_y%::Image find test::0::OK
3 | RUN ACTION | MOUSE CLICK | Left Click at %mouse_x% %mouse_y% 1 times with 10 ms delay
|
|
|
Post by Also Kyle on Aug 17, 2021 2:06:50 GMT
UPDATE: - Testing this on my furthest left monitor (closer to X = 0) works fine - My monitors are 1080p my maximum X is 5760 - This makes it harder to understand why the 'Select range' isn't working if ive specified the area of the image - Does MMM work on 2/4k displays? if so my confusion level has shot up another notch
|
|
|
Post by alsokyle on Aug 17, 2021 2:19:54 GMT
decided i should make an account so i can follow this - Hi
|
|
|
Post by Steve on Aug 17, 2021 5:06:19 GMT
Hi alsokyleI've got two monitors going only one is 4K at 4K though and I copied your line, changed the path to a local image i have, and ran your line. I got the message prompt for SUCCESS. Are you running the latest version 8.3.2.1? The only thing I can think of is maybe your running an older version that doesn't have some of the params but I'd expect a different error.
|
|
|
Post by alsokyle on Aug 17, 2021 5:52:15 GMT
I'll be running some tests later today on a different machine with a similar monitor setup & Ill post results on this thread Yeah i should have the latest version as i only brought it from you yesterday
|
|
|
Post by alsokyle on Aug 17, 2021 6:25:28 GMT
Okay, on a different machine with a similar monitor configuration I've encountered the same issue
The detect image function only works on the primary monitor
If on any secondary monitor Ill get the dreaded
"an unexpected error has occured Index was outside the bounds of the array."
Happens both with and without a specified range on the secondary monitor
Placing the image in either non primary monitor: 08/17/2021 07:10:33.44 AM Starting macro playback
08/17/2021 07:10:33.45 AM Macro condition: 2 | IF | DETECT IMAGE |
image path C:\Users\Kyle XXXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical
08/17/2021 07:10:33.61 AM Macro Condition - Detect Image : Failed to find image. Time: 154 ms
08/17/2021 07:10:33.62 AM Macro condition - Condition FALSE
08/17/2021 07:10:33.64 AM Playback error: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical - an unexpected error has occured Index was outside the bounds of the array.
Placing the image in either non primary monitor with specified range (assuming this is the same as pixel range picking the top left corner as the origin point, i dont believe this is specified on the conditions page): 08/17/2021 07:22:00.32 AM Starting macro playback
08/17/2021 07:22:00.34 AM Macro condition: 15 | IF | DETECT IMAGE |
image path C:\Users\Kyle XXXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::at 1920 0 1920 1080::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT
08/17/2021 07:22:02.77 AM Macro Condition - Detect Image : Failed to find image. Time: 2432 ms
08/17/2021 07:22:02.78 AM Macro condition - Condition FALSE
08/17/2021 07:22:02.79 AM Playback error: 15 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::at 1920 0 1920 1080::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT - an unexpected error has occured Index was outside the bounds of the array.
08/17/2021 07:22:02.81 AM Macro playback finished
Placing the image within the primary monitor: 08/17/2021 07:14:11.27 AM Starting macro playback
08/17/2021 07:14:11.28 AM Macro condition: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical
08/17/2021 07:14:11.83 AM Macro Condition - Detect Image : Found image at 341/494. Time: 547 ms
08/17/2021 07:14:11.84 AM Macro condition - Condition TRUE
08/17/2021 07:14:11.86 AM Macro action - Running ACTION: MESSAGE PROMPT - Message(It works!::Success::0::Critical)
08/17/2021 07:14:14.24 AM Macro playback finished
|
|
|
Post by Steve on Aug 17, 2021 6:57:12 GMT
Great write up thanks. Really comprehensive. This helps.
I've tested this and I can't replicate the error. My base resolution is 3840 x 2160 for my primary and 1920 x 1080 for my secondary. I can find an image on both screens replicating your syntax using the same test you have.
The only difference may be the native res. Can you run a test dropping your res?
|
|
|
Post by alsokyle on Aug 17, 2021 8:29:10 GMT
Alright so ive ran SOME more tests, please see the results below. All tests have been completed with a secondary monitor unless specified otherwise, utilizing the 'Full Screen' search option.
Also note, the monitors are all identical. Acer ED273
Using Nvidea to configure the three displays to work as one (not something i can use with my planned usecase): 1 x (5760x1080) - FAILED 08/17/2021 09:00:01.09 AM Starting macro playback
08/17/2021 09:00:01.10 AM Macro condition: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical
08/17/2021 09:00:06.74 AM Macro Condition - Detect Image : Failed to find image. Time: 5628 ms
08/17/2021 09:00:06.75 AM Macro condition - Condition FALSE
08/17/2021 09:00:06.77 AM Playback error: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical - an unexpected error has occured Index was outside the bounds of the array.
08/17/2021 09:00:06.79 AM Macro playback finished
Lowering the native resolution to 1 monitor: 2 x (1920x1080) 1 x (600x800) - New image to search captured due to the scaling change
600x800 - FAILED 08/17/2021 09:06:51.00 AM Starting macro playback
08/17/2021 09:06:51.01 AM Macro condition: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\LowResTest.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical
08/17/2021 09:06:54.94 AM Macro Condition - Detect Image : Failed to find image. Time: 3924 ms
08/17/2021 09:06:54.95 AM Macro condition - Condition FALSE
08/17/2021 09:06:54.97 AM Playback error: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\LowResTest.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical - an unexpected error has occured Index was outside the bounds of the array.
08/17/2021 09:06:54.98 AM Macro playback finished
1920x1080 (Primary Monitor) - Failed - Based on the other results, im under the impression windows changed my primary monitor in this case too as i didnt check the other display 08/17/2021 09:07:32.97 AM Starting macro playback
08/17/2021 09:07:32.99 AM Macro condition: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical
08/17/2021 09:07:34.71 AM Macro Condition - Detect Image : Failed to find image. Time: 1720 ms
08/17/2021 09:07:34.72 AM Macro condition - Condition FALSE
08/17/2021 09:07:34.74 AM Playback error: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical - an unexpected error has occured Index was outside the bounds of the array.
08/17/2021 09:07:34.75 AM Macro playback finished
Lowering the native resolution to 2 monitors: 1 x (1920x1080) 2 x (600x800) monitors are low res in this case
600x800 - one of the secondary displays worked in this case, one didn't - Success (BUT windows changed this to my primary display in the process) 08/17/2021 09:09:20.30 AM Starting macro playback
08/17/2021 09:09:20.31 AM Macro condition: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\LowResTest.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical
08/17/2021 09:09:20.50 AM Macro Condition - Detect Image : Found image at 148/425. Time: 197 ms
08/17/2021 09:09:20.52 AM Macro condition - Condition TRUE
08/17/2021 09:09:20.53 AM Macro action - Running ACTION: MESSAGE PROMPT - Message(It works!::Success::0::Critical)
08/17/2021 09:09:26.33 AM Macro playback finished
1920x1080 (previously primary Monitor) - FAILED 08/17/2021 09:09:30.74 AM Starting macro playback
08/17/2021 09:09:30.75 AM Macro condition: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\LowResTest.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical
08/17/2021 09:09:31.37 AM Macro Condition - Detect Image : Failed to find image. Time: 628 ms
08/17/2021 09:09:31.37 AM Macro condition - Condition FALSE
08/17/2021 09:09:31.39 AM Playback error: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\LowResTest.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical - an unexpected error has occured Index was outside the bounds of the array.
08/17/2021 09:09:31.40 AM Macro playback finished
Removing a one of the three displays: 2 x (1920x1080)
Primary - SUCCESS - This ones curious, i may have not had the webpage in the correct scale for this BUT it doesnt provide an index error, just unable to find the image 08/17/2021 09:21:43.11 AM Starting macro playback
08/17/2021 09:21:43.12 AM Macro condition: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical
08/17/2021 09:21:44.75 AM Macro Condition - Detect Image : Failed to find image. Time: 1626 ms
08/17/2021 09:21:44.77 AM Macro condition - Condition FALSE
08/17/2021 09:21:44.78 AM Macro playback finished
Secondary - FAILED 08/17/2021 09:20:51.28 AM Starting macro playback
08/17/2021 09:20:51.30 AM Macro condition: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical
08/17/2021 09:20:52.86 AM Macro Condition - Detect Image : Failed to find image. Time: 1585 ms
08/17/2021 09:20:52.88 AM Macro condition - Condition FALSE
08/17/2021 09:20:52.89 AM Playback error: 2 | IF | DETECT IMAGE | image path C:\Users\Kyle XXXXX\Desktop\Macro Root\Macro Root\Assets\Ticket Field Titles PNG\Catagory.bmp::match quick::move mouse yes::offset +250 +0 | IMAGE FOUND | MESSAGE PROMPT | It works!::Success::0::Critical - an unexpected error has occured Index was outside the bounds of the array.
08/17/2021 09:20:52.90 AM Macro playback finished
|
|