WaitScreenImage fails to work in compiled version

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

WaitScreenImage fails to work in compiled version

Post by gtdalsanto » Fri Feb 27, 2009 7:35 pm

I am using V11.1.04, and am having problems with the WaitScreenImage and FindImagePos not detecting valid images on the screen only on the compiled version of the script. I have been using these commands since they came out. When compiling the script with 10.1.21, it works fine. So I have narrowed it down to the version I am using.

I have since validated that the compiled version of my script works with 10.1.21, 11.0.27, but nen stopped working on the compiled version of my script on 11.0.30 to the present version of 11.1.04.

What is odd is that the same compiled script runs fine on 2 other machines with no problems. Could there possibly be something corrupted on the one machine where it doesn't work?

The script works fine on all/any machines when running it from the editor. On my one development machine, when running it from the compiled version, it just time's out, returning 0 in WSI_RESULT , and when I try finding the image using FindImagePos, it returns 0 also.

I have tried numerous things. I have raised the color tolerance, I have always captured the bitmaps using ScreenCapture> command. When it returns a zero to WSI_RESULT, I then run ScreenCapture with the original coordinates that I used to originally capture the bitmap to get the bitmap of what it is looking at. I then look at both of them in Paint, and there is no visible difference. I also replace the original bitmap with the re-captured bitmap, with still nothing seeming to work with the compiled version on this one machine.

Again, it only happens on one machine and only when running it from the compiled version. My machine is a Core2Duo with 2GB Ram running at 2.4Ghz using NVIDIA GeForce 7600GT for the video card.

Is there some files that could be corrupted from a previous version for macro-scheduler? I know the image recognition support is from a third party, so I am wondering if I need to re-register a dll.

I have deleted my temp folders where MS seems to save temp files from the image recognition commands. Not sure if there is some other temp directory I don't know about.

Any idea's would be appreciated. Like to know if there is something to try before I perform a format and load XP on the system from scratch.

Thanks.

Gary
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

idiot
Macro Veteran
Posts: 152
Joined: Thu Mar 01, 2007 9:21 am

Post by idiot » Mon Mar 02, 2009 6:27 pm

maybe make sure the windows on that computer is fully updated and also make sure you have the image its waiting for on it also if your missing some .dll files some of ms may not work correctly ive had similar problems in the past just turns out i needed updates also if grabbed image was grabbed from a lower resolution computer it would not be recognized on new one also check and make sure color screen size font size etc are the same as other 2 comp that it works on
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!

gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Post by gtdalsanto » Mon Mar 02, 2009 9:48 pm

It happens that I duplicated the problem by creating a script that captures the original baseline, then uses the image that was created by the screencapture command to return the co-ordinates with the findimagepos> command. So this script eliminates a resolution issues, font issues, baseline being captured on another machine, since I build the image file real time. After the timeout, I caputer the image at the co-ordinates that I originally created so I can compare the two bitmaps once the program terminates. And when comparing them, there are no differences.

The exact script after being compiled works with 10.1.21, and works with the first released verion of 11.0.21, but any version after that, it just hangs and the hard disk lite goes on, like it is scanning my hard drive, until it finally times out on just one machine.

I am running Windows XP Pro, with SP3 loaded, which is what I have on all of my machines. It has all the most current updates (they get updated automatically with MS update).

This issue makes no sense. The fact that compiling the script with other versions of MS and I have no problems, gives me the impression that the image recognition libraries have changed in some way.
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

Richarda.mann
Newbie
Posts: 2
Joined: Fri Jun 05, 2009 9:14 am

Post by Richarda.mann » Fri Jun 05, 2009 9:46 am

I am getting exactly the same issue. This has happened twice....

The script was working fine for 2 weeks then one day it just stopped....

Has anyone come up with a solution?

I've even tried to remove ms off the machine and re-install. It still wont work....

If I install ms on a new machine and copy the images and scipt files to it, it will work no problem.....

Its almost like a trial period has expried and the image recognition part is now non fuctioning.....

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Application images may have changed

Post by gdyvig » Fri Jun 05, 2009 1:27 pm

The first thing to check for is did the image change. Recapture the image and compare to the old. Open up both in paint and zoom in so you can see the individual pixels. Do the colors look exactly the same? Are any portions of the image offset differently from one another. Just yesterday I had an icon with a label under it. A new icon was added causing the text under the original icon to be offset by one pixel.

Gale

gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Post by gtdalsanto » Fri Jun 05, 2009 5:54 pm

I still have the problem, and can only get the compiled macro scheduler version of 10.1.21 to work with no problems. What I did do was re-installed XP with office, etc, (I have a clean image, and did a restore) and the 11.X version now works. So something in my old image is causing this functionality to fail for just the compiled version of 11.X. Not sure what it is, but something is causing it to go south, with the 10.1.21 version working fine.
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Differences between MS10 and MS11

Post by gdyvig » Fri Jun 05, 2009 6:10 pm

Is anything in your script pointing to the "Macro Scheduler" folder. It got moved to "Macro Scheduler 11" with MS11 because it added unicode support.

Gale

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Jun 05, 2009 6:20 pm

There will be a good reason for this and it is not because of v11 inherently. We're using v11 compiled macros doing image recognition extensively with no problems and it's the same code as in v10 anyway. Please email your script to support and we'll take a look for you. We may need to hook up with you over the phone and GoToMeeting and take a look at what is going on. I'm sure we'll find out what is going on.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Richarda.mann
Newbie
Posts: 2
Joined: Fri Jun 05, 2009 9:14 am

Post by Richarda.mann » Fri Jun 12, 2009 3:18 pm

Apologies for hijacking the thread.

I have solved my issue. It was the temp files stored on the PC. MS had created 65,537 fiels on the pc which is 2 to the power of 16 +1. (Max files the pc can have in a folder)

I deleted these files and now all is well again.

I hope this helps people with my problem.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts