счётчик циклов - Форум Cheat-Master.ru
Меню сайта
  • Страница 1 из 1
  • 1
Модератор форума: Sanoxxx, Alowir, Phoenixxx_Czar  
Форум » Программирование » AHK Программирование » счётчик циклов (нужно подсчитать колво циклов ахк скрипта)
счётчик циклов
тупо_майнкрафтер Дата: Суббота, 02.11.2019, 08:36 | Сообщение # 1
Новичок
Сообщений: 6
Статус: Offline
нужно дописать скрипт чтобы при нажатии клавиши к примеру (5) выводилось число циклов которое выполнил скрипт
вот собсна мой скрипт
строго не судите писал на скорую руку

Код
F6::
{
sleep, 100
mouseclick, left, 621, 526
sleep, 100
mouseclick, left, 561, 321
sleep, 100
mouseclick, left, 747, 173
sleep, 100
mouseclick, left, 814, 211
sleep, 100
mouseclick, left, 725, 550
sleep, 100
mouseclick, left, 725, 529
sleep, 100
}
loop
{
SetKeyDelay, 0
send, {esc}
sleep, 10
mouseclick, left, 955, 525
sleep, 10
mouseclick, left, 932, 777
sleep, 10
random, rand, 100, 9999999999999998
sleep, 50
send, %rand%
sleep, 10
mouseclick, left, 568, 824
Sleep, 10
mouseclick, left, 722, 824
Sleep, 10
mouseclick, left, 512, 824
Sleep, 10
mouseclick, left, 726, 406
Sleep, 10
mouseclick, left, 471, 138
sleep, 11500
SendRaw, /
sleep, 100
SendRaw, register 1212 1212
sleep, 1
send, {ENTER}
sleep, 5000
mouseclick Right
sleep, 100
mouseclick right, 694, 326
sleep, 5000
send, {w Down}
sleep, 1500
send, {w}
sleep, 600
SendRaw, /
sleep, 100
SendRaw, kit start
sleep, 1
send, {ENTER}
sleep, 100
SendRaw, /
sleep, 100
SendRaw, kit default
sleep, 1
send, {ENTER}
sleep, 100
send, {a Down}
sleep, 1400
send, {a}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {d Down}
sleep, 2830
send, {d}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {a Down}
sleep, 2830
send, {a}
sleep, 3500
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {d Down}
sleep, 2830
send, {d}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {a Down}
sleep, 2830
send, {a}
sleep, 3500
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {d Down}
sleep, 2800
send, {d}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 6000
SendRaw, /
sleep, 300
SendRaw, warp skigayga
sleep, 1
send, {ENTER}
sleep, 1000
send, /
sleep, 300
SendRaw, suicide
sleep, 1
send, {ENTER}
Sleep, 2300
click
sleep,1000
mouseclick, left, 562, 384
sleep, 4000
mouseclick, left, 723, 493
sleep, 1
send, {esc}

sleep, 10
mouseclick, left, 955, 525
sleep, 10
mouseclick, left, 932, 777
sleep, 10
random, rand, 100, 9999999999999998
sleep, 50
send, %rand%
sleep, 10
mouseclick, left, 568, 824
Sleep, 10
mouseclick, left, 722, 824
Sleep, 10
mouseclick, left, 512, 824
Sleep, 10
mouseclick, left, 726, 406
Sleep, 10
mouseclick, left, 471, 138
sleep, 11500
SendRaw, /
sleep, 100
SendRaw, register 1212 1212
sleep, 1
send, {ENTER}
sleep, 5000
mouseclick Right
sleep, 100
mouseclick right, 694, 326
sleep, 5000
send, {w Down}
sleep, 1500
send, {w}
sleep, 600
SendRaw, /
sleep, 100
SendRaw, kit start
sleep, 1
send, {ENTER}
sleep, 100
SendRaw, /
sleep, 100
SendRaw, kit default
sleep, 1
send, {ENTER}
sleep, 100
send, {a Down}
sleep, 1400
send, {a}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {d Down}
sleep, 2830
send, {d}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {a Down}
sleep, 2830
send, {a}
sleep, 3500
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {d Down}
sleep, 2830
send, {d}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {a Down}
sleep, 2830
send, {a}
sleep, 3500
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {d Down}
sleep, 2800
send, {d}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 6000
SendRaw, /
sleep, 300
SendRaw, warp skigayga
sleep, 1
send, {ENTER}
sleep, 1000
send, /
sleep, 300
SendRaw, suicide
sleep, 1
send, {ENTER}
Sleep, 2300
click
sleep,1000
mouseclick, left, 562, 384
sleep, 4000
mouseclick, left, 723, 493
sleep, 1
send, {esc}

sleep, 10
mouseclick, left, 955, 525
sleep, 10
mouseclick, left, 932, 777
sleep, 10
random, rand, 100, 9999999999999998
sleep, 50
send, %rand%
sleep, 10
mouseclick, left, 568, 824
Sleep, 10
mouseclick, left, 722, 824
Sleep, 10
mouseclick, left, 512, 824
Sleep, 10
mouseclick, left, 726, 406
Sleep, 10
mouseclick, left, 471, 138
sleep, 11500
SendRaw, /
sleep, 100
SendRaw, register 1212 1212
sleep, 1
send, {ENTER}
sleep, 5000
mouseclick Right
sleep, 100
mouseclick right, 694, 326
sleep, 5000
send, {w Down}
sleep, 1500
send, {w}
sleep, 600
SendRaw, /
sleep, 100
SendRaw, kit start
sleep, 1
send, {ENTER}
sleep, 100
SendRaw, /
sleep, 100
SendRaw, kit default
sleep, 1
send, {ENTER}
sleep, 100
send, {a Down}
sleep, 1400
send, {a}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {d Down}
sleep, 2830
send, {d}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {a Down}
sleep, 2830
send, {a}
sleep, 3500
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {d Down}
sleep, 2830
send, {d}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {a Down}
sleep, 2830
send, {a}
sleep, 3500
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 200
send, {d Down}
sleep, 2800
send, {d}
sleep, 1
send, {Click Right}
sleep, 200
mouseclick, left, 729, 365
sleep, 6000
SendRaw, /
sleep, 300
SendRaw, warp skigayga
sleep, 1
send, {ENTER}
sleep, 1000
send, /
sleep, 300
SendRaw, suicide
sleep, 1
send, {ENTER}
Sleep, 2300
click
sleep,1000
mouseclick, left, 562, 384
sleep, 4000
mouseclick, left, 723, 493
sleep, 1
mouseclick, left, 732, 531
sleep, 1
send, {esc}
sleep, 601000
}
Return

end:: pause


Сообщение отредактировал CZAR - Суббота, 02.11.2019, 10:14
CZAR Дата: Суббота, 02.11.2019, 10:09 | Сообщение # 2
AHK Скриптер
Сообщений: 1073
Статус: Offline
Код помещай в "code", так ты не будешь растягивать сообщение.
Насчет скрипта, я бы на твоем месте не делал бы слип в конце цикла, а запустил таймер, так скрипт не будет в ожидайке.

Код
global _global := {active: 0, count: 0}

vk35:: ; 5
tooltip, % "Кол-во выполненных циклов: " _global.count
sleep, 5000
tooltip
return

F6::
SetTimer, farmResources, % ((_global.active := !_global.active) ? 6010000 : "off")
if (!_global.active)
return

sleep, 100
mouseclick, left, 621, 526
sleep, 100
mouseclick, left, 561, 321
sleep, 100
mouseclick, left, 747, 173
sleep, 100
mouseclick, left, 814, 211
sleep, 100
mouseclick, left, 725, 550
sleep, 100
mouseclick, left, 725, 529
sleep, 100
farmResources()
return

farmResources()
{
_global.count++

; тут твои действия
}





Я в ВК
Ушел в веб.

• Ничего не покупаю.
• Способы не проверяю.


Гарант Cheat-Master: *тема*

AHK
SAMP-UDF
[AHK Урок] Выбор в диалогах мышкой и enter`ом
[SAMP] Флудер
[SAMP] Быстрый ответ на СМС
[SAMP] Счетчик наигранного времени
[ERP] Помощник для адвоката
[DRP] Flooder SMS
[DRP] FakeTime
[Arizona] Бот для казино (/dice 1001)

Достижения:
- 26.02.2017
- 03.01.2018
- 26.05.2018
- 22.09.2018
- 04.04.2019
Форум » Программирование » AHK Программирование » счётчик циклов (нужно подсчитать колво циклов ахк скрипта)
  • Страница 1 из 1
  • 1
Поиск: