Да, видимо не "случайно", пардоньте) Солгать и вовсе в мыслях не было.
На счет Undefine - проставил, проблема не решилась. Однозначно собака зарыта в другом месте. Я уже 3 дня не могу справится.
Помогите, прошу, уже апатия начинается, но я уверен эту задачу можно разрешить(
LOGWRITE("00.00.00")
WAITMS(50)
EXECUTE("h.bat - Ярлык")
WAIT(5) // тут должно было быть ожидание окна через вайл, но скрипт идет дальше не дожидаясь его появления
$hwnd1 = wndfind("h")
WAITMS(500)
// CTRL+: G / S / A / C / V /
SUB(G)
KEYDOWN(#CTRL)
WAITMS(50)
KEYDOWN(#G)
WAITMS(50)
KEYUP(#G)
WAITMS(50)
KEYUP(#CTRL)
END_SUB
SUB(S)
KEYDOWN(#CTRL)
WAITMS(50)
KEYDOWN(#S)
WAITMS(50)
KEYUP(#S)
WAITMS(50)
KEYUP(#CTRL)
END_SUB
SUB(A)
KEYDOWN(#CTRL)
WAITMS(50)
KEYDOWN(#A)
WAITMS(50)
KEYUP(#A)
WAITMS(50)
KEYUP(#CTRL)
END_SUB
SUB(C)
KEYDOWN(#CTRL)
WAITMS(50)
KEYDOWN(#C)
WAITMS(50)
KEYUP(#C)
WAITMS(50)
KEYUP(#CTRL)
END_SUB
SUB(V)
KEYDOWN(#CTRL)
WAITMS(50)
KEYDOWN(#V)
WAITMS(50)
KEYUP(#v)
WAITMS(50)
KEYUP(#CTRL)
END_SUB
SUB(pastenter, $_hh)
TOCLIP($_hh)
WAITMS(50)
V()
WAITMS(50)
KEYPRESS(#ENTER)
END_SUB
SUB(start)
HSET($hwnd1,1)
WAITMS(50)
$check = 0 // прохождение апи (картинка)
WHILE($check = 0)
GETSCREEN
IF_PICTURE_IN(0,0, $_xmax,$_ymax, "e1.bmp") // апи
$check = 1
WAITMS(50)
LCLICK(500,283)
Else
WAITMS(100)
END_IF
END_CYC
$check = 0 // прохождение апи (картинка)
WHILE($check = 0)
GETSCREEN
IF_PICTURE_IN(0,0, $_xmax,$_ymax, "f1.bmp") // апи
$check = 1
WAITMS(50)
KEYPRESS(#SPACE)
Else
WAITMS(100)
END_IF
END_CYC
WAITMS(50)
LCLICK(500,283)
WAIT(1)
LOGWRITE("START")
END_SUB
SUB(start1)
LOGWRITE("1")
$check = 0 // прохождение апи (картинка)
WHILE($check = 0)
GETSCREEN
IF_PICTURE_IN(399,175, 598,315, "g1.bmp")
// IF_PICTURE_IN(0,0, $_xmax,$_ymax, "g1.bmp") // апи
$check = 1
WAITMS(50)
KEYPRESS(#TAB)
Else
WAITMS(100)
END_IF
END_CYC
LOGWRITE("2")
WAITMS(50)
KEYPRESS(#SPACE)
WAITMS(50)
LCLICK(500,283)
WAIT(1)
LCLICK(840,30)
$check = 0
WHILE($check = 0)
GETSCREEN
IF_PICTURE_IN(6,406, 1007,444, "a1.bmp")
$check = 1
WAITMS(50)
LCLICK(516,460)
Else
WAITMS(100)
END_IF
END_CYC
WAIT(1)
LCLICK(520,32)
WAIT(2)
$time = $_time_t + 15
GETSCREEN
$hash1 = PXLCRC(50,91, 135,363)
$hash2 = $hash1
WHILE(($hash1 = $hash2)&($time > $_time_t))
WAITMS(50)
GETSCREEN
$hash1 = PXLCRC(50,91, 135,363)
END_CYC
IF($hash1 = $hash2)
$check = 0
WHILE($check = 0)
GETSCREEN
IF_PICTURE_IN(0,0, $_xmax,$_ymax, "a1.bmp")
$check = 1
WAITMS(50)
$check = 0 // прохождение апи (картинка)
WHILE($check = 0)
GETSCREEN
IF_PICTURE_IN(0,0, $_xmax,$_ymax, "n1.bmp") // апи
$check = 1
WAITMS(50)
LCLICK(126,208)
Else
WAITMS(50)
END_IF
END_CYC
Else
WAITMS(100)
END_IF
END_CYC
END_IF
END_SUB
SUB(checkp)
EXECUTE("strok.txt")
WAIT(2)
$hwnd2 = wndfind("strok.txt — Блокнот")
WAITMS(50)
WNDBUMP($hwnd2)
WAITMS(50)
HSET($hwnd2,1)
WAITMS(50)
LCLICK(360,140)
WAITMS(50)
HSET(0,0)
KEYDOWN(#WIN)
WAITMS(50)
KEYPRESS(#UP)
WAITMS(50)
KEYUP(#WIN)
WAITMS(50)
A()
WAITMS(50)
V()
WAITMS(50)
G()
WAITMS(50)
TOCLIP("9999")
WAITMS(50))
V()
WAITMS(50)
KEYPRESS(#ENTER)
WAITMS(50)
KEYPRESS(#ENTER)
WAITMS(50)
C()
WAITMS(50)
LOGWRITE(FROMCLIP())
WAITMS(50)
KEYPRESS(#ESC)
WAITMS(50)
S()
WAITMS(50)
HSET($hwnd2,1)
WAITMS(50)
SENDMESSAGE($hwnd2,0x0010,0,0)
WAITMS(50)
HSET(0,0)
WAITMS(50)
END_SUB
SUB(addnew)
WAITMS(50)
EXECUTE("CDII")
WAIT(5)
$hwnd3 = wndfind("CDII")
WAITMS(50)
HSET(0,0)
WNDBUMP($hwnd3)
WAITMS(50)
LCLICK(21,28)
WAITMS(50)
LCLICK(21,48)
WAITMS(50)
DBLCLICK(203,183)
WAIT(2)
KEYPRESS(#F5)
WAITMS(50)
$check = 0
WHILE($check = 0)
GETSCREEN
IF_PICTURE_IN(1,706, 169,727, "fp1.bmp")
$check = 1
WAITMS(50)
A()
Else
WAITMS(100)
END_IF
END_CYC
WAITMS(50)
C()
WAITMS(50)
HSET($hwnd3,1)
WAITMS(50)
SENDMESSAGE($hwnd3,0x0010,0,0)
WAITMS(50)
HSET($hwnd1,1)
WAITMS(50)
WNDBUMP($hwnd1)
WAITMS(50)
LCLICK(408,167)
WAITMS(50)
HSET(0,0)
WAITMS(50)
A()
WAITMS(50)
LOGWRITE("ANP")
WAITMS(50)
V()
WAITMS(50)
HSET($hwnd1,1)
WAITMS(50)
LCLICK(700,30)
WAIT(2)
GETSCREEN
$hash1 = PXLCRC(150,88, 400,363)
$hash2 = $hash1
WHILE($hash1 = $hash2)
WAITMS(50)
GETSCREEN
$hash2 = PXLCRC(150,88, 400,363)
END_CYC
WAITMS(50)
LCLICK(519,461)
WAITMS(50)
HSET(0,0)
WAITMS(50)
END_SUB
SUB(promooo)
$LOGWRITE("CHECK")
WAITMS(50)
$pp = FROMCLIP ()
IF($pp < 300)
addnew()
ELSE
WAITMS(50)
HSET($hwnd1,1)
WAITMS(50)
WNDBUMP($hwnd1)
WAITMS(50)
LCLICK(521,459)
WAITMS(50)
END_IF
END_SUB
SUB(putinprice)
LOGWRITE("CONFIG_PUT")
WAIT(2)
HSET($hwnd1,1)
LCLICK(367,29)
WAITMS(50)
HSET(0,0)
WAITMS(50)
A()
WAITMS(50)
TOCLIP(500)
WAITMS(50)
V()
WAITMS (50)
KEYPRESS(#TAB)
WAITMS(50)
TOCLIP(50)
WAITMS(50)
V()
WAITMS (50)
KEYPRESS(#TAB)
WAITMS(50)
KEYPRESS(#SPACE)
WAITMS(50)
HSET($hwnd1,1)
WAITMS(50)
LCLICK(524,461)
WAITMS(50)
HSET(0,0)
END_SUB
SUB(totscu)
LOGWRITE("CONFIG_FILT")
WAIT(2)
HSET($hwnd1,1)
WAITMS(50)
LCLICK(135,107)
WAITMS(50)
HSET(0,0)
WAITMS(50)
A()
WAITMS(50)
TOCLIP(2016)
WAITMS(50)
V()
WAITMS (50)
KEYPRESS(#TAB)
WAITMS(50)
TOCLIP(2017)
WAITMS(50)
V()
WAITMS (50)
KEYPRESS(#TAB)
WAITMS(50)
TOCLIP(5)
WAITMS(50)
V()
WAITMS (50)
KEYPRESS(#TAB)
WAITMS (50)
KEYPRESS(#TAB)
WAITMS(50)
TOCLIP(1)
WAITMS(50)
V()
WAITMS (50)
HSET($hwnd1,1)
LCLICK(428,400)
WAITMS (50)
HSET(0,0)
KEYDOWN(#SHIFT)
WAITMS (50)
KEYPRESS(#TAB)
WAITMS (50)
KEYPRESS(#TAB)
WAITMS (50)
KEYPRESS(#TAB)
WAITMS (50)
KEYPRESS(#TAB)
WAITMS (50)
KEYUP(#SHIFT)
WAITMS(50)
KEYPRESS(#SPACE)
WAITMS(50)
HSET($hwnd1,1)
WAITMS(50)
LCLICK(692,106)
WAITMS(50)
HSET(0,0)
A()
WAITMS(50)
pastenter("$1")
WAITMS (50)
pastenter("$2")
WAITMS (50)
pastenter("$3")
WAITMS (50)
pastenter("$4")
WAITMS (50)
pastenter("$5")
WAITMS (50)
pastenter("$6")
WAITMS (50)
pastenter("$7")
WAITMS (50)
pastenter("$8")
WAITMS (50)
pastenter("$9")
WAITMS (50)
pastenter("$10")
WAITMS (50)
HSET($hwnd1,1)
WAITMS(50)
HSET(0,0)
END_SUB
SUB(hii, $_price)
LOGWRITE("CONFIG_HII")
HSET($HWND1,1)
WAIT(2)
LCLICK(135,30)
WAITMS(50)
LCLICK(154,136)
WAITMS(50)
HSET(0,0)
WAITMS(50)
A()
WAITMS(50)
TOCLIP(1)
WAITMS(50)
V()
WAITMS(50)
KEYPRESS(#TAB)
WAITMS(50)
A()
WAITMS(50)
TOCLIP(900)
WAITMS(50)
V()
WAITMS(50)
HSET($hwnd1,1)
WAITMS(50)
LCLICK(472,135)
WAITMS(50)
HSET(0,0)
WAITMS(50)
A()
WAITMS(50)
TOCLIP(10)
WAITMS(50)
V()
WAITMS(50)
KEYPRESS(#TAB)
WAITMS(50)
KEYPRESS(#TAB)
WAITMS(50)
KEYPRESS(#TAB)
WAITMS(50)
KEYPRESS(#SPACE)
WAITMS(50)
HSET($hwnd1,1)
WAITMS(50)
LCLICK(234,29)
WAITMS(50)
LCLICK(163,330)
WAITMS(50)
KEYPRESS(#TAB)
WAITMS(50)
KEYPRESS(#SPACE)
WAITMS(50)
KEYPRESS(#TAB)
WAITMS(50)
KEYPRESS(#SPACE)
WAITMS(50)
LCLICK(275,30)
WAITMS(50)
LCLICK(169,107)
WAITMS(50)
HSET(0,0)
WAITMS(50)
A()
WAITMS(50)
TOCLIP(1)
WAITMS(50)
V()
WAITMS(50)
HSET($hwnd1,1)
WAITMS(50)
LCLICK(158,147)
WAITMS(50)
HSET(0,0)
WAITMS(50)
A()
WAITMS(50)
TOCLIP($_price)
WAITMS(50)
V()
WAITMS(50)
HSET($hwnd1,1)
WAITMS(10)
LCLICK(514,458)
WAITMS(50)
HSET(0,0)
END_SUB
SUB(sct)
WAITMS(50)
LOGWRITE("ADD_SCT")
WAIT(50)
EXECUTE("s1.bat")
WAIT(2)
$s1bat = FROMCLIP()
WNDBUMP($hwnd1)
WAITMS(500)
HSET($hwnd1,1)
WAITMS(50)
LCLICK(62,161)
WAITMS(50)
HSET(0,0)
pastenter($s1bat) // ctrl+V + Enter
WAITMS(50)
HSET($hwnd1,1)
WAITMS(50)
KEYPRESS(#ENTER)
END_SUB
SUB(s1to5)
LOGWRITE("ADD_NP+")
WAIT(2)
HSET($hwnd1,1)
WAITMS(50)
EXECUTE("s2.bat")
WAIT(2)
HSET(0,0)
WNDBUMP($hwnd1)
WAITMS(50)
KEYPRESS (#ENTER)
WAITMS(50)
V()
WAITMS(50)
KEYPRESS(#ENTER)
WAIT(1)
HSET($hwnd1,1)
WAITMS(50)
LCLICK(502,401)
WAITMS(50)
LCLICK(521,459)
WAITMS(1)
HSET(0,0)
END_SUB
SUB(waitfin)
HSET($hwnd1,1)
$check = 0
WHILE($check = 0)
GETSCREEN
IF_PICTURE_IN(429,184, 838,322, "next.bmp")
$check = 1
WAITMS(50)
LCLICK(504,261)
Else
WAITMS(100)
END_IF
END_CYC
END_SUB
SUB(addtobl)
WAIT(3)
HSET($hwnd1,1)
WAIT(1)
WNDBUMP($hwnd1)
WAITMS(50)
HSET(0,0)
WAITMS(50)
A()
WAITMS(50)
KEYDOWN(#WIN)
WAITMS(50)
KEYPRESS(#UP)
WAITMS(50)
KEYUP(#WIN)
WAIT(1)
RCLICK(388,160)
WAITMS(500)
KEYPRESS(#DOWN)
WAITMS(500)
KEYPRESS(#RIGHT)
WAITMS(500)
LCLICK(540,476)
WAITMS(1)
KEYDOWN(#WIN)
WAITMS(50)
KEYPRESS(#DOWN)
WAITMS(50)
KEYUP(#WIN)
WAIT(1)
END_SUB
SUB(cNBL)
EXECUTE("brlist.txt")
WAIT(5)
$hwndx = wndfind("brlist.txt — Блокнот")
WAITMS(500)
WNDBUMP($hwndx)
WAITMS(500)
HSET($hwndx,1)
WAITMS(500)
LCLICK(360,140)
WAITMS(500)
HSET(0,0)
KEYDOWN(#WIN)
WAITMS(50)
KEYPRESS(#UP)
WAITMS(50)
KEYUP(#WIN)
WAITMS(500)
A()
WAITMS(500)
V()
WAITMS(500)
S()
WAITMS(500)
HSET($hwndx,1)
WAITMS(50)
SENDMESSAGE($hwndx,0x0010,0,0)
WAITMS(50)
HSET(0,0)
WAITMS(50)
EXECUTE("dBL.bat")
WAIT(2)
END_SUB
SUB(skryp, $_txt_)
TFREADARR("brlist.txt", $arr)
WAITMS(50)
FOR($a=0,$a<ARRSIZE($arr))
WAITMS(50)
$arr[$a] = STRCONCAT("$$1-100", $arr[$a])
WAITMS(50)
END_CYC
WAITMS(50)
TFWRITEARR($_txt_, $arr)
WAITMS(50)
UNDEFINE($arr)
END_SUB
SUB(bkS)
LOGWRITE("btosc")
WNDBUMP($hwnd1)
WAITMS(500)
HSET(0,0)
WAITMS(50)
KEYDOWN(#WIN)
WAITMS(50)
KEYPRESS(#UP)
WAITMS(50)
KEYUP(#WIN)
WAITMS(500)
RCLICK(199,161)
WAITMS(50)
KEYPRESS(#DOWN)
WAITMS(50)
KEYPRESS(#DOWN)
WAITMS(50)
KEYPRESS(#DOWN)
WAITMS(50)
KEYPRESS(#RIGHT)
WAITMS(50)
KEYPRESS(#DOWN)
WAITMS(50)
KEYPRESS(#ENTER)
WAITMS(500)
KEYDOWN(#WIN)
WAITMS(50)
KEYPRESS(#DOWN)
WAITMS(50)
KEYUP(#WIN)
WAITMS(50)
HSET($hwnd1,1)
WAITMS(50)
LCLICK(26,464)
WAITMS(50)
END_SUB
SUB(o500)
LOGWRITE("FORM_500")
EXECUTE("s499.bat")
WAITMS(50)
EXECUTE("500.txt")
WAIT(3)
$hwnd7 = wndfind("500.txt — Блокнот")
WAITMS(50)
WNDBUMP($hwnd7)
WAITMS(50)
HSET($hwnd7,1)
WAITMS(50)
LCLICK(360,140)
WAITMS(50)
HSET(0,0) //
KEYDOWN(#WIN)
WAITMS(50)
KEYPRESS(#UP)
WAITMS(50)
KEYUP(#WIN)
WAITMS(50)
V()
WAITMS(50)
G()
WAITMS(50)
A()
WAITMS(50)
TOCLIP(9999)
WAITMS(50)
V()
WAITMS(50)
KEYPRESS(#ENTER)
WAITMS(50)
KEYPRESS(#ESC)
WAITMS(50)
C()
WAITMS(50)
KEYPRESS(#ESC)
WAITMS(50)
S()
WAITMS(50)
HSET($hwnd7,1)
WAITMS(50)
SENDMESSAGE($hwnd7,0x0010,0,0)
WAITMS(50)
HSET(0,0)
WAITMS(50)
LOGWRITE(FROMCLIP())
END_SUB
SUB(WORK)
WAITMS(50)
start1()
WAITMS(50)
checkp()
WAITMS(50)
promooo()
WAITMS(50)
putinprice()
WAITMS(50)
totscu()
WAITMS(50)
hii("100")
WAITMS(50)
sct()
WAITMS(50)
s1to5()
WAITMS(50)
waitfin()
WAITMS(50)
addtobl()
WAITMS(50)
EXECUTE("dFriW.bat")
WAITMS(50)
addtobl()
WAITMS(50)
EXECUTE("nircmd.exe", "clipboard readfile brandlist.txt")
WAITMS(50)
cNBL()
WAITMS(50)
skryp("100.txt")
WAITMS(50)
EXECUTE("rRi.bat")
WAIT(2)
bkS()
WAITMS(50)
////////////////////////////////////////////
start1()
WAITMS(50)
checkp()
WAITMS(50)
promooo()
WAITMS(50)
putinprice()
WAITMS(50)
totscu()
WAITMS(50)
hii("300")
WAITMS(50)
s1to5() // тут
WAITMS(50)
waitfin()
WAITMS(50)
addtobl()
EXECUTE("dFriR.bat")
WAITMS(50)
addtobl()
WAITMS(50)
EXECUTE("nircmd.exe", "clipboard readfile brandlist.txt") // ПРОБЛЕМЫ С ЭТОЙ ТОЧКИ. в cNBL не передается значение скопированного текста из файла. В буфере остается значение взятое из s1to5
WAITMS(50)
cNBL() // соответственно сюда вставляется уже инфомусор, и все на перекосяк
WAITMS(50)
skryp("499.txt")
WAITMS(50)
o500()
WAITMS(50)
EXECUTE("rWi.bat")
WAITMS(50)
bkS()
WAITMS(50)
END_SUB
/////////////////////////////////////////
HSET($hwnd1,1)
WAITMS(50)
WNDBUMP($hwnd1)
WAITMS(50)
start()
WORK()
WAITMS(50)
HSET(0,0)
WAITMS(50)
$ftst = FROMCLIP ()
IF($ftst < 1)
WAITMS(50)
WORK()
ELSE
WAITMS(50)
LOGWRITE("DONE")
END_IF
HALT