Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
image not always found
#1
Hi,
I've been using QM for a few years now and just started having an issue that I don't understand. I have three identical systems and i run a macro that uses the wait image command. The images are saved in the resources of the macro, not external files. The problem I have been having is that on one computer the images are not always recognized even though the images are present on the screen.

I have the color difference setting at 64 which has been working fine.

I can temporarily fix the problem by resizing the target window and then setting back the correct dimensions. So, I am not sure if the problem is in the graphics card, or the QM program or something else. This only has been happening on one of the systems.

Any ideas about how to troubleshoot this issue?

Thanks
Jim
Reply
#2
This is strange:
Quote:I can temporarily fix the problem by resizing the target window and then setting back the correct dimensions.

Now I have 2 ideas:

1. Maybe the window somehow does not correctly repaint. Try to repaint it before:
Code:
Select All      Help
int w=win(...)
InvalidateRect w 0 1; UpdateWindow w
scan ...
;If you use not scan but wait, try to use scan now just to see how it works with window repainting. For wait S will need a different repainting code.

2. Try to add flag 0x1000 or 0x100. If already is, try to remove.
Reply
#3
Ok, thanks. I will try your suggestions the next time it fails. One question - Is there a difference between SCAN command running in the macro and using the find image tool to create the IF scan command for the macro? Because when it fails, it fails both in the macro and if I use the find tool and set to use existing resource. So I scan for an existing resource and it fails inside the find tool. I have tried to close the window and reopen and it still fails when using the tool. does closing the window manually have the same effect as InvalidateRect w 0 1; UpdateWindow w?

Also to be clear, this macro is created on the 'master' computer and then the main.qml file is copied to the other computers. I assume this doesn't make any difference in relation to the problem I am having. I have been doing it like that for years, whenever I need to make a change, I always do it on the master, then copy it over.

this is the wait command I am using. wait 10 S "image:h1AD57BFC" w1 0 1|16|128|0x400 64
Reply
#4
Quote:Is there a difference between SCAN command running in the macro and using the find image tool
No. The tool's Test button executes scan with the same arguments.

Quote:does closing the window manually have the same effect as InvalidateRect
Similar.

Quote:'master' computer and then the main.qml file is copied to the other computers. I assume this doesn't make any difference
No difference.
Reply
#5
So the difference between the find image tool and the scan command is just the not all the flags can be set in the tool.. correct?
Reply
#6
Quote:Is there a difference between SCAN command running in the macro and using the find image tool
Isn't.

(my English is not perfect. Probably the "No" can be understood like "there is a difference")
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)