1
Общие вопросы / Re: Много простых команд
« on: September 05, 2019, 09:41:23 AM »
Ага спасибо.. все работает.)
Добавлена тема оформления "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.
THREAD(t1, 0)
GETSCREEN
IF_PIXEL_IN(200,200,1600,730, 89778)
LCLICK($_return1, $_return2)
WAITMS(20)
KEYPRESS(#5)
ELSE
WAITMS(20)
END_IF
WAITMS(50)
END_THREAD
//=============================================
IF(ISKEYDOWN(#SPACE)=1)
SETTHREAD (t1,1)
WHILE(ISKEYDOWN(#SPACE)=1)
WAITMS(20)
END_CYC
SETTHREAD (t1,2)
END_IF
THREAD(t1, 0)
KEYPRESS(#q)
waitms(RND(200,300))
END_THREAD
THREAD(t2, 0)
KEYPRESS(#w)
waitms(RND(200,300))
END_THREAD
THREAD(t3, 0)
KEYPRESS(#e)
waitms(RND(200,300))
END_THREAD
THREAD(t4, 0)
KEYPRESS(#r)
waitms(RND(200,300))
END_THREAD
THREAD(t5, 0)
LCLICK($_xmouse,$_ymouse)
waitms(RND(70,120))
END_THREAD
THREAD(t6, 0)
GETSCREEN
IF(PXL (51,120) = 0)
KEYPRESS(#SPACE)
ELSE
waitms(RND(100,200))
END_IF
END_THREAD
THREAD(t7, 0)
GETSCREEN
IF_PIXEL_IN(409,886,703,908, 546815)
SOUND("Свежеемясо.wav")
waitms(RND(3000,3500))
END_IF
END_THREAD
//=============================================
IF(ISKEYDOWN(48)=1)
SETTHREAD (t5,1)
WHILE(ISKEYDOWN(48)=1)
WAITMS(20)
END_CYC
SETTHREAD (t5,2)
END_IF
IF(ISKEYDOWN(53)=1)
WHILE(ISKEYDOWN(53)=1)
END_CYC
IF($t1 = 0)
$t1 = $t1^1
// включение
SETTHREAD (t1,1)
SETTHREAD (t2,1)
SETTHREAD (t3,1)
SETTHREAD (t4,1)
SETTHREAD (t6,1)
SETTHREAD (t7,1)
BEEP(1200,100) // сигнал включения
ELSE
$t1 = $t1^1
// выключение
SETTHREAD (t1,2)
SETTHREAD (t2,2)
SETTHREAD (t3,2)
SETTHREAD (t4,2)
SETTHREAD (t6,2)
SETTHREAD (t7,2)
BEEP(700,100) // сигнал выключения
END_IF
END_IF
WAITMS(20)
THREAD(t7, 0)
GETSCREEN
IF_PIXEL_IN(409,886,703,908, 546815)
SOUND("Свежеемясо.wav")
waitms(RND(3000,3500))
END_IF
END_THREAD
THREAD(t1, 0)
KEYPRESS(#q)
waitms(RND(200,300))
END_THREAD
THREAD(t2, 0)
KEYPRESS(#w)
waitms(RND(200,300))
END_THREAD
THREAD(t3, 0)
KEYPRESS(#e)
waitms(RND(200,300))
END_THREAD
THREAD(t4, 0)
KEYPRESS(#r)
waitms(RND(200,300))
END_THREAD
THREAD(t5, 0)
LCLICK($_xmouse,$_ymouse)
waitms(RND(70,120))
END_THREAD
THREAD(t6, 0)
GETSCREEN
IF(PXL (55,125) = 0)
KEYPRESS(#SPACE)
ELSE
waitms(RND(100,200))
END_IF
END_THREAD
//=============================================
IF(ISKEYDOWN(5)=1)
SETTHREAD (t5,1)
WHILE(ISKEYDOWN(5)=1)
WAITMS(20)
END_CYC
SETTHREAD (t5,2)
END_IF
IF(ISKEYDOWN(6)=1)
WHILE(ISKEYDOWN(6)=1)
END_CYC
IF($t1 = 0)
$t1 = $t1^1
// включение
SETTHREAD (t1,1)
SETTHREAD (t2,1)
SETTHREAD (t3,1)
SETTHREAD (t4,1)
SETTHREAD (t6,1)
BEEP(1200,100) // сигнал включения
ELSE
$t1 = $t1^1
// выключение
SETTHREAD (t1,2)
SETTHREAD (t2,2)
SETTHREAD (t3,2)
SETTHREAD (t4,2)
SETTHREAD (t6,2)
BEEP(700,100) // сигнал выключения
END_IF
END_IF
WAITMS(20)
THREAD(t1, 1)
KEYPRESS(#q)
waitms(RND(200,300))
END_THREAD
THREAD(t2, 1)
KEYPRESS(#w)
waitms(RND(200,300))
END_THREAD
THREAD(t3, 1)
KEYPRESS(#e)
waitms(RND(200,300))
END_THREAD
THREAD(t4, 1)
KEYPRESS(#r)
waitms(RND(200,300))
END_THREAD
THREAD(t5, 0)
LCLICK($_xmouse,$_ymouse)
waitms(RND(70,120))
END_THREAD
IF(ISKEYDOWN(5)=1)
SETTHREAD (t5,1)
WHILE(ISKEYDOWN(5)=1)
WAITMS(20)
END_CYC
SETTHREAD (t5,2)
ELSE
WAITMS(20)
END_IF
GETSCREEN
COLORMODE(6)
IF_PICTURE_IN (342,698,454,802, "shot0003.bmp", -1, 70)
KEYPRESS(#SPACE)
WAIT(200)
END_IF
Скриншот я сделал с помощью этого:// Получение скриншота с цветокоррекцией (фильтр 6)
// Скриншот появится в папке screens папки скрипта или в папке кликера
GETSCREEN
COLORMODE(6)
SCREENSHOT
HALT
IF(ISKEYDOWN(#0)=1)
WHILE(ISKEYDOWN(#0)=1)
END_CYC
IF($t1 = 0)
$t1 = $t1^1
SETTHREAD (t1,1)
SETTHREAD (t2,1)
SETTHREAD (t3,1)
SETTHREAD (t4,1)
SETTHREAD (t5,1)
ELSE
$t1 = $t1^1
SETTHREAD (t1,2)
SETTHREAD (t2,2)
SETTHREAD (t3,2)
SETTHREAD (t4,2)
SETTHREAD (t5,2)
END_IF
ELSE
WAITMS(20)
END_IF
Это если кнопка 0 вкл и еще раз 0 выкл. А если нужно держать и они работают т1-т5, а отпустить они перестанут, как это сделать?
THREAD(t1, 0)
KEYPRESS(#q)
waitms(RND(200,300))
END_THREAD
THREAD(t2, 0)
KEYPRESS(#w)
waitms(RND(200,300))
END_THREAD
THREAD(t3, 0)
KEYPRESS(#e)
waitms(RND(200,300))
END_THREAD
THREAD(t4, 0)
KEYPRESS(#r)
waitms(RND(200,300))
END_THREAD
THREAD(t5, 0)
LCLICK($_xmouse,$_ymouse)
waitms(RND(70,120))
END_THREAD
IF(ISKEYDOWN(#0)=1)
WHILE(ISKEYDOWN(#0)=1)
END_CYC
IF($t1 = 0)
$t1 = $t1^1
SETTHREAD (t1,1)
SETTHREAD (t2,1)
SETTHREAD (t3,1)
SETTHREAD (t4,1)
SETTHREAD (t5,1)
ELSE
$t1 = $t1^1
SETTHREAD (t1,2)
SETTHREAD (t2,2)
SETTHREAD (t3,2)
SETTHREAD (t4,2)
SETTHREAD (t5,2)
END_IF
ELSE
WAITMS(20)
END_IF
[code]
Конечно есть, потоки!Code: (clickermann) [Select]THREAD(t1, 1)
KEYPRESS(#A)
WAITMS(500)
KEYPRESS(#B)
WAITMS(500)
KEYPRESS(#C)
WAITMS(500)
END_THREAD
THREAD(t2, 1)
KEYPRESS(#D)
WAIT(3)
END_THREAD
THREAD(t3, 1)
LCLICK(100,500)
WAITMS(50)
END_THREAD
WAIT(1)