Exception EFOpenError in module imglib.dll

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Exception EFOpenError in module imglib.dll

Post by jpuziano » Tue Jan 03, 2006 8:11 pm

Hi Support,

I am trying to get the Google Button example script to work from the new "Macro Scheduler Image Library" but keep getting the following error:

Exception EFOpenError in module imglib.dll at 000124C2

Here is the script:
Let>imglibDll=%SCRIPT_DIR%\imglib.dll
LibLoad>imglibDll,imglib

//Focus Google
SetFocus>Google - Microsoft Internet Explorer*
Wait>1
//Get bounds of window
GetActiveWindow>title,X,Y,W,H

//Capture the screen to a bitmap
IfFileExists>c:\screen.bmp
DeleteFile>c:\screen.bmp
EndIf
ScreenCapture>X,Y,W,H,c:\screen.bmp

LibFunc>imglib,FindImgPos,imgs,c:\googlebutton.bmp,c:\screen.bmp,20,1,ref:0,ref:0
If>imgs>0
//click on button
//remember that x,y returned is relative the image and since we didn't use the
//full screen we will need add top left offset to get screen coordinates
Let>x=imgs_5+x
Let>y=imgs_6+y
MouseMove>x,y
LClick
Endif

LibFree>imglib
In trying to make this work here, I've:
- changed drive d's to c's for any files
- added a * to the end of the SetFocus command
- even moved a copy of imglib.dll into the default script directory
for me, %SCRIPT_DIR% = C:\Program Files\MJT Net Ltd\Macro Scheduler

...but no go.


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

I also noticed in the first 2 lines, you set imglibDLL but then use imglibdll (dll not in CAPS)... but changing that doesn't change things... help...

P.S. The GetScreenRes example from the help file though worked great though...

Let>imglibDLL=%SCRIPT_DIR%\imglib.dll
LibFunc>imglibDLL,GetScreenRes,screen,ref:0,ref:0
ScreenCapture>0,0,screen_1,screen_2,c:\screen.bmp

MDL>Screen Res = %screen_1% by %screen_2%
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

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

Post by Marcus Tettmar » Tue Jan 03, 2006 9:03 pm

Hi,

EFOpenError means it could not open one of the bmp files. Are you sure c:\googlebutton.bmp exists?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue Jan 03, 2006 9:42 pm

That was it, I hadn't created the file...
but once c:\googlebutton.bmp was in place, it worked fine.

Thanks for the quick reply, this new ability is a great addition.

Also, answered myself on the question about the variable names... I sometimes forget that in Macro Scheduler, capitalization does not matter in variable names. I found that out one day, though its not specifically mentioned in the help file (as far as I can find).

Thanks again!
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

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