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:
In trying to make this work here, I've: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
- 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%