Hi. I'm starting to use AHK, i want do creat a script to randomize some actions, like move every x minutes, where x is the randomized number.
There is a function to do this? Or i need to creat an equation?
Tibia/ Random actions
-
- Posts: 2
- Joined: 02 Dec 2018, 15:50
Re: Tibia/ Random actions
What you want is Random: https://autohotkey.com/docs/commands/Random.htm
Code: Select all
loop
{
Move, 0, 0
Random, OutputVar , 100, 100000 ; between 100ms and 100,000ms
sleep %outputvar% ; waits for the random amount from the previous line and then resumes the loop
}
-
- Posts: 2
- Joined: 02 Dec 2018, 15:50
Re: Tibia/ Random actions
And how do i select a button(left, right) to do the action?Maestr0 wrote: ↑02 Dec 2018, 16:22What you want is Random: https://autohotkey.com/docs/commands/Random.htm
Code: Select all
loop { Move, 0, 0 Random, OutputVar , 100, 100000 ; between 100ms and 100,000ms sleep %outputvar% ; waits for the random amount from the previous line and then resumes the loop }
Re: Tibia/ Random actions
Your initial question did not mention clicking (left,right).
This information (and a lot more besides) is in the manual, I suggest you read it: https://autohotkey.com/docs/commands/Click.htm
Who is online
Users browsing this forum: No registered users and 61 guests