1 (изменено: Bass06, 2015-10-27 15:57:57)

Тема: AHK: увеличить время нажатия некоторых клавиш


F2::




loop
{

loop 36


{

sleep 625

sleep 425
ControlSend  ahk_parent, {shift down}7{shift up}, - ArcheAge -,
sleep 3100


ControlSend  ahk_parent, {7 down}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {7 up}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, 7, - ArcheAge -,
sleep 1550


ControlSend  ahk_parent, {shift down}, - ArcheAge -,
ControlSend  ahk_parent, 1, - ArcheAge -,
ControlSend  ahk_parent, {shift up}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift down}, - ArcheAge -,
ControlSend  ahk_parent, 1, - ArcheAge -,
ControlSend  ahk_parent, {shift up}, - ArcheAge -,

sleep 1100
ControlSend  ahk_parent, {shift down}, - ArcheAge -,
ControlSend  ahk_parent, 2, - ArcheAge -,
ControlSend  ahk_parent, {shift up}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift down}, - ArcheAge -,
ControlSend  ahk_parent, 2, - ArcheAge -,
ControlSend  ahk_parent, {shift up}, - ArcheAge -,
sleep 1325
ControlSend  ahk_parent, {0 down}, - ArcheAge -,
sleep 25
ControlSend  ahk_parent, {0 up}, - ArcheAge -,
sleep 25
ControlSend  ahk_parent, 0, - ArcheAge -,


loop 27
{
ControlSend  ahk_parent, {- down}, - ArcheAge -,

sleep 362
ControlSend  ahk_parent, {- up}, - ArcheAge -,
}                                                       



loop 11
{

ControlSend  ahk_parent, {- down}, - ArcheAge -,

sleep 400
ControlSend  ahk_parent, {- up}, - ArcheAge -,

sleep 10

ControlSend  ahk_parent, {f8}, - ArcheAge -,

sleep 10

sleep 21

sleep 21

}

sleep 1050


                                                            ; 20000

ControlSend  ahk_parent, {7 down}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {7 up}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, 7, - ArcheAge -,
sleep 1550


ControlSend  ahk_parent, {shift down}, - ArcheAge -,
ControlSend  ahk_parent, 1, - ArcheAge -,
ControlSend  ahk_parent, {shift up}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift down}, - ArcheAge -,
ControlSend  ahk_parent, 1, - ArcheAge -,
ControlSend  ahk_parent, {shift up}, - ArcheAge -,

sleep 1100
ControlSend  ahk_parent, {shift down}, - ArcheAge -,
ControlSend  ahk_parent, 2, - ArcheAge -,
ControlSend  ahk_parent, {shift up}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift down}, - ArcheAge -,
ControlSend  ahk_parent, 2, - ArcheAge -,
ControlSend  ahk_parent, {shift up}, - ArcheAge -,
sleep 1025
ControlSend  ahk_parent, {0 down}, - ArcheAge -,
sleep 25
ControlSend  ahk_parent, {0 up}, - ArcheAge -,
sleep 25
ControlSend  ahk_parent, 0, - ArcheAge -,

loop 21
{
ControlSend  ahk_parent, {- down}, - ArcheAge -,

sleep 362
ControlSend  ahk_parent, {- up}, - ArcheAge -,
}                                                       

ControlSend  ahk_parent, {left down}, - ArcheAge -,

loop 7

{
ControlSend  ahk_parent, {- down}, - ArcheAge -,

sleep 362
ControlSend  ahk_parent, {- up}, - ArcheAge -,
}
ControlSend  ahk_parent, {left up}, - ArcheAge -,


loop 13
{

ControlSend  ahk_parent, {- down}, - ArcheAge -,

sleep 400
ControlSend  ahk_parent, {- up}, - ArcheAge -,

sleep 10

ControlSend  ahk_parent, {f8}, - ArcheAge -,

sleep 10

sleep 21

sleep 21

}


}



sleep 1050
ControlSend  ahk_parent, {shift down}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {=}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift up}, - ArcheAge -,

sleep 1050

ControlSend  ahk_parent, {shift down}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {-}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift up}, - ArcheAge -,

sleep 1050

ControlSend  ahk_parent, {shift down}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {0}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift up}, - ArcheAge -,

sleep 1050

ControlSend  ahk_parent, {shift down}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {9}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift up}, - ArcheAge -,





}

F11::Pause, toggle

как сделать так что бы последние


sleep 1050
ControlSend  ahk_parent, {shift down}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {=}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift up}, - ArcheAge -,

sleep 1050

ControlSend  ahk_parent, {shift down}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {-}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift up}, - ArcheAge -,

sleep 1050

ControlSend  ahk_parent, {shift down}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {0}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift up}, - ArcheAge -,

sleep 1050

ControlSend  ahk_parent, {shift down}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {9}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift up}, - ArcheAge -,

повторялось через 45 мин а не 30

2 (изменено: Nikva, 2015-10-27 17:48:14)

Re: AHK: увеличить время нажатия некоторых клавиш

Супер-тема, заходите — не пожалеете
Обязательно прочитать перед созданием темы!

И уточните вопрос:
Как именно, тот участок кода должен повторяться.
К примеру можно просто поставить 15ти минутную задержку прямо перед ним.

Sleep % 15*60*1000
+ открыть спойлер

И просьба хоть как-нибудь, сокращать код, перед тем как его скидывать на форум.

3

Re: AHK: увеличить время нажатия некоторых клавиш

я в этом нуб, потому скопировал все для тех кто понимает, тот участок кнопки шифт+= и т.д. нажимаются 30 мин 1 раз мне надо сделать 45 мин 1 раз, где надо что поменять скажите пожалуйста

4 (изменено: Alectric, 2015-10-27 21:45:39)

Re: AHK: увеличить время нажатия некоторых клавиш

Bass06 пишет:

я в этом нуб

Знаки припинания расставь, а то модератор тебя забанит.
"Sleep" - это задержка в миллисекундах, в математике то ты не нуб? Или я ошибаюсь... Извиняюсь за грубость.

Win 10 x64
AHK v1.1.33.02
                       Справка тебе в помощь.

5

Re: AHK: увеличить время нажатия некоторых клавиш

я код скопировал, потому что там нет sleep на 30 мин, а нажимается через 30, мне надо 45

6 (изменено: Alectric, 2015-10-27 21:49:45)

Re: AHK: увеличить время нажатия некоторых клавиш

Если уж я тебя не понимаю, то тебе здесь вряд-ли кто-то поможет. Изъясняйся яснее. И поставь хоть 1 точку. Чего 30, куда 30?...

Bass06 пишет:

... я код скопировал, потому что там нет sleep на 30 мин, а нажимается через 30 слонов, мне надо 45 квадратов?

Win 10 x64
AHK v1.1.33.02
                       Справка тебе в помощь.

7

Re: AHK: увеличить время нажатия некоторых клавиш

sleep 1050
ControlSend  ahk_parent, {shift down}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {=}, - ArcheAge -,
sleep 50
ControlSend  ahk_parent, {shift up}, - ArcheAge -,

вот этот код клавиша Шифт+=
она срабатывает после того как запустишь скрипт каждые 30 минут, мне надо что бы она нажималась каждые 45 минут. Так понятно?

8 (изменено: Alectric, 2015-10-27 22:00:41)

Re: AHK: увеличить время нажатия некоторых клавиш

Bass06 пишет:

Так понятно?

Уже лучше.

Попробуй заменить:

sleep 1050

на

sleep 1000*900

Предложения с заглавной буквы писать еще осталось тебя научить...

Win 10 x64
AHK v1.1.33.02
                       Справка тебе в помощь.

9 (изменено: Bass06, 2015-10-27 22:02:45)

Re: AHK: увеличить время нажатия некоторых клавиш

Сейчас посмотрим))

10 (изменено: Alectric, 2015-10-27 22:20:58)

Re: AHK: увеличить время нажатия некоторых клавиш

Вот как должен выглядеть код, чтоб в нем было легко разобраться:

F2::
loop
{
  loop 54 ; 36 циклов равняется 30-и минутам... наверно... значит нужно: 36/30*45=54 цикла.
  {
    sleep 1050
    ControlSend  ahk_parent, {shift down}7{shift up}, - ArcheAge -,
    sleep 3100
    ControlSend  ahk_parent, {7 down}, - ArcheAge -,
    sleep 50
    ControlSend  ahk_parent, {7 up}, - ArcheAge -,
    sleep 50
    ControlSend  ahk_parent, 7, - ArcheAge -,
    sleep 1550
    ControlSend  ahk_parent, {shift down}, - ArcheAge -,
    ControlSend  ahk_parent, 1, - ArcheAge -,
    ControlSend  ahk_parent, {shift up}, - ArcheAge -,
    sleep 50
    ControlSend  ahk_parent, {shift down}, - ArcheAge -,
    ControlSend  ahk_parent, 1, - ArcheAge -,
    ControlSend  ahk_parent, {shift up}, - ArcheAge -,
    sleep 1100
    ControlSend  ahk_parent, {shift down}, - ArcheAge -,
    ControlSend  ahk_parent, 2, - ArcheAge -,
    ControlSend  ahk_parent, {shift up}, - ArcheAge -,
    sleep 50
    ControlSend  ahk_parent, {shift down}, - ArcheAge -,
    ControlSend  ahk_parent, 2, - ArcheAge -,
    ControlSend  ahk_parent, {shift up}, - ArcheAge -,
    sleep 1325
    ControlSend  ahk_parent, {0 down}, - ArcheAge -,
    sleep 25
    ControlSend  ahk_parent, {0 up}, - ArcheAge -,
    sleep 25
    ControlSend  ahk_parent, 0, - ArcheAge -,

    loop 27
    {
      ControlSend  ahk_parent, {- down}, - ArcheAge -,
      sleep 362
      ControlSend  ahk_parent, {- up}, - ArcheAge -,
    }

    loop 11
    {
      ControlSend  ahk_parent, {- down}, - ArcheAge -,
      sleep 400
      ControlSend  ahk_parent, {- up}, - ArcheAge -,
      sleep 10
      ControlSend  ahk_parent, {f8}, - ArcheAge -,
      sleep 52
    }

    sleep 1050
      ; 20000
    ControlSend  ahk_parent, {7 down}, - ArcheAge -,
    sleep 50
    ControlSend  ahk_parent, {7 up}, - ArcheAge -,
    sleep 50
    ControlSend  ahk_parent, 7, - ArcheAge -,
    sleep 1550
    ControlSend  ahk_parent, {shift down}, - ArcheAge -,
    ControlSend  ahk_parent, 1, - ArcheAge -,
    ControlSend  ahk_parent, {shift up}, - ArcheAge -,
    sleep 50
    ControlSend  ahk_parent, {shift down}, - ArcheAge -,
    ControlSend  ahk_parent, 1, - ArcheAge -,
    ControlSend  ahk_parent, {shift up}, - ArcheAge -,
    sleep 1100
    ControlSend  ahk_parent, {shift down}, - ArcheAge -,
    ControlSend  ahk_parent, 2, - ArcheAge -,
    ControlSend  ahk_parent, {shift up}, - ArcheAge -,
    sleep 50
    ControlSend  ahk_parent, {shift down}, - ArcheAge -,
    ControlSend  ahk_parent, 2, - ArcheAge -,
    ControlSend  ahk_parent, {shift up}, - ArcheAge -,
    sleep 1025
    ControlSend  ahk_parent, {0 down}, - ArcheAge -,
    sleep 25
    ControlSend  ahk_parent, {0 up}, - ArcheAge -,
    sleep 25
    ControlSend  ahk_parent, 0, - ArcheAge -,

    loop 21
    {
      ControlSend  ahk_parent, {- down}, - ArcheAge -,
      sleep 362
      ControlSend  ahk_parent, {- up}, - ArcheAge -,
    }
    ControlSend  ahk_parent, {left down}, - ArcheAge -,
    loop 7
    {
      ControlSend  ahk_parent, {- down}, - ArcheAge -,
      sleep 362
      ControlSend  ahk_parent, {- up}, - ArcheAge -,
    }
    ControlSend  ahk_parent, {left up}, - ArcheAge -,
    loop 13
    {
      ControlSend  ahk_parent, {- down}, - ArcheAge -,
      sleep 400
      ControlSend  ahk_parent, {- up}, - ArcheAge -,
      sleep 10
      ControlSend  ahk_parent, {f8}, - ArcheAge -,
      sleep 52
    }
  }
  sleep 1050
  ControlSend  ahk_parent, {shift down}, - ArcheAge -,
  sleep 50
  ControlSend  ahk_parent, {=}, - ArcheAge -,
  sleep 50
  ControlSend  ahk_parent, {shift up}, - ArcheAge -,
  sleep 1050
  ControlSend  ahk_parent, {shift down}, - ArcheAge -,
  sleep 50
  ControlSend  ahk_parent, {-}, - ArcheAge -,
  sleep 50
  ControlSend  ahk_parent, {shift up}, - ArcheAge -,
  sleep 1050
  ControlSend  ahk_parent, {shift down}, - ArcheAge -,
  sleep 50
  ControlSend  ahk_parent, {0}, - ArcheAge -,
  sleep 50
  ControlSend  ahk_parent, {shift up}, - ArcheAge -,
  sleep 1050
  ControlSend  ahk_parent, {shift down}, - ArcheAge -,
  sleep 50
  ControlSend  ahk_parent, {9}, - ArcheAge -,
  sleep 50
  ControlSend  ahk_parent, {shift up}, - ArcheAge -,
}

F11::Pause, toggle

Win 10 x64
AHK v1.1.33.02
                       Справка тебе в помощь.

11

Re: AHK: увеличить время нажатия некоторых клавиш

Приятно когда есть у кого учиться)))
Спасибо тебе.