1
Использование / Re: GOTO в SUB и INCLUDE
« on: September 19, 2022, 04:59:11 PM »
главное чтоб скрипт работал, и в тех редакторах, которыми я пользуюсь всё подсвечивается нормально
Добавлена тема оформления "Clickermann" для кода с подсветкой синтаксиса. Выбирается из выпадающего списка "Код" (рядом с "цвет", "размер" и "шрифт") в режиме редактирования поста. Либо просто BB-тегом "code=clickermann"
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
// рабочий цикл
logshow(1, 100,100)
$1ax1 = 637 //тут стоит формула, но для примера поставил число
$1ay1 = 321
$6hx1 = $1ax1+216
$6hy1 = $1ay1+288
FOR($tby1=$1ay1, $tby1 < $6hy1-5, +36)
FOR($tbx1=$1ax1, $tbx1 < $6hx1-5, +36)
//вычисляем и присваиваем координаты ячейки, и всех остальных отталкиваясь от верхнего левого угла
$tbx2 = $tbx1+36
$tby2 = $tby1+36
//тут тело скрипта действий с ячейкой
logwrite($tbx1,$tby1)
waitms(100)
END_CYC
END_CYC
halt
t6-8:
#include "\bl\t+2Kpdrdpr.cms"
#include "bl\sld48.cms"
GETSCREEN(624, 288, 851, 616)
IF_PICTURE_IN(624, 288, 851, 616, "\pict\001.bmp", -1, 60)
MOVE($_return1, $_return2)
WAIT(1)
ELSE
#include "bl\plznv.cms"
GOTO(bgn1)
END_IF
GETSCREEN(624, 288, 851, 616)
COLORMODE(8, 624, 288, 851, 616)
IF_PICTURE_IN(624, 288, 851, 616, "\pict\06.bmp", -1, 98)
#include "\bl\t+2Kpdrdpr.cms"
#include "bl\plznv.cms"
ELSE
#include "bl\plznv.cms"
END_IF
GOTO(bgn1)
//1-1
GETSCREEN
IF_PICTURE_IN(624, 317, 680, 367, "\pict\001.bmp", -1, 60)
GOTO(1h1)
ELSE
GOTO(1h-2)
END_IF
1h1:
FOR($a=0, $a < 2)
MOVE(1013,831)
WAITMS(201)
LDOWN(1013,831)
WAITMS(99)
LUP(1013,831)
WAITMS(1501)
MOVE(652,343)
WAITMS(201)
LDOWN(652,343)
WAITMS(500)
MOVER(10,10)
WAITMS(201)
MOVE(1059,467)
WAITMS(201)
LUP(1059,467)
WAITMS(101)
MOVE(1014,740)
WAITMS(101)
LDOWN(1014,740)
MOVER(10,10)
WAITMS(102)
MOVE(1016,477)
WAITMS(103)
LUP(1016,477)
WAITMS(104)
MOVE(974,577)
WAITMS(902)
LDOWN(974,577)
WAITMS(99)
LUP(974,577)
WAITMS(4701)
GETSCREEN
IF_PICTURE_IN(988, 431, 1043, 491, "\pict\cri.bmp", -1, 60)
GOTO(1h-2)
END_IF
END_CYC
//1-2
1h-2:
GETSCREEN
IF_PICTURE_IN(664, 317, 716, 367, "\pict\001.bmp", -1, 60)
GOTO(1h2)
ELSE
GOTO(1h-3)
END_IF
1h2:
FOR($a=0, $a < 2)
MOVE(1013,831)
WAITMS(201)
LDOWN(1013,831)
WAITMS(99)
LUP(1013,831)
WAITMS(1501)
MOVE(691,343)
WAITMS(201)
LDOWN(691,343)
WAITMS(500)
MOVER(10,10)
WAITMS(201)
MOVE(1059,467)
WAITMS(201)
LUP(1059,467)
WAITMS(101)
MOVE(1014,740)
WAITMS(101)
LDOWN(1014,740)
MOVER(10,10)
WAITMS(102)
MOVE(1016,477)
WAITMS(103)
LUP(1016,477)
WAITMS(104)
MOVE(974,577)
WAITMS(902)
LDOWN(974,577)
WAITMS(99)
LUP(974,577)
WAITMS(4701)
GETSCREEN
IF_PICTURE_IN(988, 431, 1043, 491, "\pict\cri.bmp", -1, 60)
GOTO(1h-3)
END_IF
END_CYC
//1-3
1h-3:
GETSCREEN
IF_PICTURE_IN(704, 317, 752, 367, "\pict\001.bmp", -1, 60)
GOTO(1h3)
ELSE
GOTO(1h-4)
END_IF
1h3:
FOR($a=0, $a < 2)
MOVE(1013,831)
WAITMS(201)
LDOWN(1013,831)
WAITMS(99)
LUP(1013,831)
WAITMS(1501)
MOVE(727,343)
WAITMS(201)
LDOWN(727,343)
WAITMS(500)
MOVER(10,10)
WAITMS(201)
MOVE(1059,467)
WAITMS(201)
LUP(1059,467)
WAITMS(101)
MOVE(1014,740)
WAITMS(101)
LDOWN(1014,740)
MOVER(10,10)
WAITMS(102)
MOVE(1016,477)
WAITMS(103)
LUP(1016,477)
WAITMS(104)
MOVE(974,577)
WAITMS(902)
LDOWN(974,577)
WAITMS(99)
LUP(974,577)
WAITMS(4701)
GETSCREEN
IF_PICTURE_IN(988, 431, 1043, 491, "\pict\cri.bmp", -1, 60)
GOTO(1h-4)
END_IF
END_CYC
и дальше ещё 2000+ строк кода но они похожиIF_PICTURE_IN(624, 288, 851, 616, "\pict\06.bmp", -1, 98)
#include "\bl\t+2Kpdrdpr.cms"
sub(2Kpdrdpr)
#include "\bl\t+2Kpdrdpr.cms"
end_sub
2Kpdrdpr()