troubles with image library sample

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
esuohlluf
Junior Coder
Posts: 41
Joined: Thu Mar 23, 2006 5:33 am

troubles with image library sample

Post by esuohlluf » Tue Apr 04, 2006 9:43 pm

I've started to play with the Image Library and ran this sample from the help section

Macro Scheduler Example
In this example we use CompareBitmaps to wait for the screen to change by more than 90%:

Let>imglibDLL=%SCRIPT_DIR%\imglib.dll
LibLoad>imglibDll,imglib

LibFunc>imglib,GetScreenRes,screen,ref:0,ref:0
ScreenCapture>0,0,screen_1,screen_2,d:\screen1.bmp

Let>match=0
Repeat>match
ScreenCapture>0,0,screen_1,screen_2,d:\screen2.bmp
LibFunc>imglib,CompareBitmaps,match,d:\screen1.bmp,d:\screen2.bmp
Wait>0.2
Until>matchWe have a new screen ...

LibFree>imglib


So the first thing that seemed counter-intuitive to me was 'match<90'
which to me means that if 11% or more of the screen doesn't match we
get the message box.
Ignoring this I went ahead and ran the script, and as stated in the help I need to change the vast majority of the screen before I got the message box.
So for me logic would have it that match<10 would be at the other extreme.
So I ran it with match<10 and still I need to change almost the entire screen to get the message box.
I started the script and brought up yahoo messenger which occupies about
30% of the screen and got no message box.
Next I changed my desktop to a flat gray. tried at both extremes and still
had the same results.
Also the shortcut icons on my desktop got broken up and stayed that way even after I shutdown the script and the program. I needed to click on each of the effected icons to restore them.
I dont think it has to do the my computer hardware ,I have 2 gigs of ram
a P4 630 and a 10K rpm hard drive.

Any help with why the image library seems to have this effect on my computer and why changing 'match< x' doesnt seem to have any effect
the outcome is appreciated.

esuohlluf
Junior Coder
Posts: 41
Joined: Thu Mar 23, 2006 5:33 am

Post by esuohlluf » Wed Apr 05, 2006 12:34 am

The icons toward the top of my desktop break up after showing Macro Scheduler only.
No other program that I have tried effects my desktop icons. This problem
started after installing the Image Library and persists after I have uninstalled the Image Library.

Help

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