Сорри, никак не мог понять из-за чего это происходит.
Происходит обычно на findimage. В данном примере на первом if(findimage)
CODE:
#define mRollBtnImageSizeX 54
#define mRollBtnImageSizeY 14
int mRollBtnImage[mRollBtnImageSizeX][mRollBtnImageSizeY];
loadimage(#mRollBtnImage[0][0], pathfolder() + "RollBtn.bmp");
#define mRollBtnSelImageSizeX 52
#define mRollBtnSelImageSizeY 13
int mRollBtnSelImage[mRollBtnSelImageSizeX][mRollBtnSelImageSizeY];
loadimage(#mRollBtnSelImage[0][0], pathfolder() + "RollBtnSel.bmp");
int mPanelRect[4];
mPanelRect[0] = 185;
mPanelRect[1] = 115;
mPanelRect[2] = 110;
mPanelRect[3] = 160;
int mRollBtnPos[2];
int mPlayBtnPos[2];
function Roll(win _win) {
Close1(_win);
Click1(_win);
if(findimage(1, #mRollBtnImage[0][0], 0, #mImageX[0], #mImageY[0], mPanelRect[0], mPanelRect[1], mPanelRect[2], mPanelRect[3], 10, 10, 10, 10, 10, 10, 80, 1, _win) > 0) {
mRollBtnPos[0] = mImageX[0] + mPanelRect[0] + (mRollBtnImageSizeX / 2);
mRollBtnPos[1] = mImageY[0] + mPanelRect[1] + (mRollBtnImageSizeY / 2);
}
else {
if(findimage(1, #mRollBtnSelImage[0][0], 0, #mImageX[0], #mImageY[0], mPanelRect[0], mPanelRect[1], mPanelRect[2], mPanelRect[3], 10, 10, 10, 10, 10, 10, 80, 1, _win) > 0) {
mRollBtnPos[0] = mImageX[0] + mPanelRect[0] + (mRollBtnImageSizeX / 2);
mRollBtnPos[1] = mImageY[0] + mPanelRect[1] + (mRollBtnImageSizeY / 2);
}
}
sleep(1000);
GotoAndClick(mRollBtnPos[0], mRollBtnPos[1], 10, 10, _win);
}