if statement not working? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
wryyymuda
Posts: 32
Joined: 21 Sep 2018, 21:43

if statement not working?

21 Sep 2018, 23:10

idk, im probably being dumb since im a noob at this but what am i doing wrong?

Code: Select all

,::
islabel(start)
start:
InputBox, time , delay , this dictates the delay between messages in ms, ,  200, 200

if (%time% < 550)
	{
	msgbox, error, time is less than 550. this may cause errors in sending messages in discord.
	gosub, start
	}
else  
	{ 
	gosub, notstart
	}
islabel(notstart)
notstart:
msgbox, your desired time is %time%ms
return
it always does the first if statment even if time is greater than 550
wryyymuda
Posts: 32
Joined: 21 Sep 2018, 21:43

Re: if statement not working?

21 Sep 2018, 23:28

AHKStudent wrote:remove %%

if (time < 550)
this works thanks!
wryyymuda
Posts: 32
Joined: 21 Sep 2018, 21:43

Re: if statement not working?

21 Sep 2018, 23:28

AHKStudent wrote:remove %%

if (time < 550)
this works thanks!
wryyymuda
Posts: 32
Joined: 21 Sep 2018, 21:43

Re: if statement not working?

21 Sep 2018, 23:28

AHKStudent wrote:remove %%

if (time < 550)
this works thanks!
wryyymuda
Posts: 32
Joined: 21 Sep 2018, 21:43

Re: if statement not working?

21 Sep 2018, 23:28

yep, i never thought about the %%. i just thought they were required.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Joey5 and 379 guests