Please HELP Random% Question

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Jakk_Uber_Noob
Posts: 18
Joined: 19 Sep 2017, 04:14

Please HELP Random% Question

22 Sep 2017, 18:24

Hi guys here is my hypothetical code, Does ahk have Odds*?
My idea is that Somehow i can get AHK to flip and imaginary coin before executing a command to determine if it will execute it or not.
F1::
Loop
{
;;;Chance to execute next line 50%;;;;<--------- =HOW??
Send, 12345678910a
Sleep, 1000

;;;Chance to execute next line 50%;;;;
Send, 01987654321b
Sleep, 1000

;;;Chance to execute next line 50%;;;;
Send, 01987654321c
Sleep, 1000
Continue
}

Hope to hear from you all soon!
User avatar
boiler
Posts: 16925
Joined: 21 Dec 2014, 02:44

Re: Please HELP Random% Question

22 Sep 2017, 20:03

Code: Select all

F1::
Loop
{
	Random, Rand, 1, 100
	if (Rand <= 50)
		Send, 12345678910a
	Sleep, 1000

	Random, Rand, 1, 100
	if (Rand <= 50)
		Send, 01987654321b
	Sleep, 1000

	Random, Rand, 1, 100
	if (Rand <= 50)
		Send, 01987654321c
	Sleep, 1000
	Continue
}
Jakk_Uber_Noob
Posts: 18
Joined: 19 Sep 2017, 04:14

Re: Please HELP Random% Question

22 Sep 2017, 21:26

boiler wrote:

Code: Select all

F1::
Loop
{
	Random, Rand, 1, 100
	if (Rand <= 50)
		Send, 12345678910a
	Sleep, 1000

	Random, Rand, 1, 100
	if (Rand <= 50)
		Send, 01987654321b
	Sleep, 1000

	Random, Rand, 1, 100
	if (Rand <= 50)
		Send, 01987654321c
	Sleep, 1000
	Continue
}
ILY This is perfect THANK YOU SO MUCH

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, Lamron750, Rohwedder and 280 guests