I set this up so that new file "a" will be the top left quadrant, new file "b" will be the top right quadrant, new file "c" will be the lower left quadrant and new file "d" will be the lower right quadrant.
Hope this helps,
Dick
Code: Select all
//These values need to be tested with your system
//Change them ass needed to make the resulting
//images correct
Let>TitleBarOffset=23
Let>BorderOffset=4
//You need to change this line to point to your source folder
Let>Image_Dir=C:\BMP_Directory\
//You need to change this line to point to your target folder
Let>400x400_dir=C:\BMP_Directory\400_x_400\
Let>image_dir={lower(%image_dir%)}
GetFileList>%Image_Dir%*.bmp,BMP_List,;
Let>BMP_List={lower(%BMP_List%)}
Stringreplace>BMP_List,%Image_Dir%,,BMP_List
Separate>BMP_List,;,BMP
Dialog>Dialog1
Caption=BMP_image
Width=850
Height=850
Top=CENTER
Left=CENTER
Image=C:\nosuchfile,0,0,800,800,nextfile
EndDialog>Dialog1
Show>dialog1
GetWindowPos>BMP_image,Xpos,Ypos
Add>Xpos,%BorderOffset%
Add>Ypos,%TitleBarOffset%
GetDialogAction>dialog1,res1
//Top left quad
Let>X_1_1=Xpos
Let>y_1_1=Ypos
Let>X_1_2=%Xpos%+400
Let>Y_1_2=%Ypos%+400
//Top right quad
Let>X_2_1=%Xpos%+400
Let>y_2_1=Ypos
Let>X_2_2=%Xpos%+800
Let>Y_2_2=%Ypos%+400
//Bottom left quad
Let>X_3_1=Xpos
Let>y_3_1=%Ypos%+400
Let>X_3_2=%Xpos%+400
Let>Y_3_2=%Ypos%+800
//Bottom right quad
Let>X_4_1=%Xpos%+400
Let>y_4_1=%Ypos%+400
Let>X_4_2=%Xpos%+800
Let>Y_4_2=%Ypos%+800
VBSTART
VBEND
VBEval>timer,starttime
Let>kk=0
Repeat>kk
Add>kk,1
Let>value=BMP_%kk%
Let>dialog1.nextfile=%Image_Dir%%value%
StringReplace>%value%,.bmp,,newname
ResetDialogAction>dialog1
ScreenCapture>X_1_1,Y_1_1,X_1_2,Y_1_2,%400x400_dir%%newname%a.bmp
ScreenCapture>X_2_1,Y_2_1,X_2_2,Y_2_2,%400x400_dir%%newname%b.bmp
ScreenCapture>X_3_1,Y_3_1,X_3_2,Y_3_2,%400x400_dir%%newname%c.bmp
ScreenCapture>X_4_1,Y_4_1,X_4_2,Y_4_2,%400x400_dir%%newname%d.bmp
Until>kk,BMP_count
VBEval>timer,endtime
Let>TotalTime=%endtime%-%starttime%
CloseDialog>dialog1
MDL>Complete%CRLF%%CRLF%The task took %TotalTime% seconds