ControlSend

Ask gaming related questions (AHK v1.1 and older)
nlhtp
Posts: 3
Joined: 03 Jun 2021, 22:14

ControlSend

Post by nlhtp » 10 Jun 2021, 05:39

Hello everyone, I need some help with my script..
I want to ask what is the correct script to seperate delay(sleep) command.
This is my script

Code: Select all

$,::
loop
{

ControlSend,, {u}, gem1
sleep, 150
ControlSend,, {h}, gem1
sleep, 150

ControlSend,, {5}, gem1 ; I want only this command sleep 1900000 & not waiting 1900000 for next command.
sleep, 1900000

ControlSend,, {a}, gem1
sleep, 150

}

$.::pause

Thanks in advance.

Rohwedder
Posts: 7614
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: ControlSend

Post by Rohwedder » 10 Jun 2021, 06:03

Hallo,
your sleep in the loop stops this loop for the specified time. Since during this time other hotkeys could be started and executed this is like waiting for other commands.

nlhtp
Posts: 3
Joined: 03 Jun 2021, 22:14

Re: ControlSend

Post by nlhtp » 10 Jun 2021, 20:46

Rohwedder wrote:
10 Jun 2021, 06:03
Hallo,
your sleep in the loop stops this loop for the specified time. Since during this time other hotkeys could be started and executed this is like waiting for other commands.
Thanks for your reply.
It's mean I must separate the command to 2 script and run 2 scripts?
Is there another commands except ControlSend to run all my commands ?

Rohwedder
Posts: 7614
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: ControlSend

Post by Rohwedder » 11 Jun 2021, 01:22

You want to separate the following command to 2 scripts?:

Code: Select all

ControlSend,, {5}, gem1 ; I want only this command sleep 1900000 & not waiting 1900000 for next command.
sleep, 1900000
Well, ControlSend,, {5}, gem1 consists of ControlSend,, {5 Down}, gem1 and ControlSend,, {5 Up}, gem1
If you want 1900 seconds to pass in between then I recommend using a timer!

nlhtp
Posts: 3
Joined: 03 Jun 2021, 22:14

Re: ControlSend

Post by nlhtp » 11 Jun 2021, 02:55

Rohwedder wrote:
11 Jun 2021, 01:22
You want to separate the following command to 2 scripts?:

Code: Select all

ControlSend,, {5}, gem1 ; I want only this command sleep 1900000 & not waiting 1900000 for next command.
sleep, 1900000
Well, ControlSend,, {5}, gem1 consists of ControlSend,, {5 Down}, gem1 and ControlSend,, {5 Up}, gem1
If you want 1900 seconds to pass in between then I recommend using a timer!
Woahhhh thank you so much. It's work!! :dance:

Post Reply

Return to “Gaming Help (v1)”