if statement not working? Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
wryyymuda
Posts: 15
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
AHKStudent
Posts: 308
Joined: 05 May 2018, 12:23

Re: if statement not working?  Topic is solved

21 Sep 2018, 23:25

remove %%

if (time < 550)
wryyymuda
Posts: 15
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: 15
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: 15
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: 15
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”

Who is online

Users browsing this forum: Bing [Bot], hoppfrosch, shipaddicted and 30 guests