Can't Use Sleep Command in If Else Statement

Get help with using AutoHotkey and its commands and hotkeys
soulreaver
Posts: 2
Joined: 22 May 2018, 02:10

Can't Use Sleep Command in If Else Statement

22 May 2018, 02:16

Hi there,

So I am trying to make a script that checks to see if one pixel is a certain color, then if it is, presses a button. If not, it moves onto the next statement: if another pixel is a certain color, then I want it to press a button and wait 400 milliseconds. Else, then just press another button. The problem is, whenever I try to put in the sleep command, I get an error saying the last else statement has no if part to it. This is what I have so far:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

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

Re: Can't Use Sleep Command in If Else Statement

22 May 2018, 06:19

Hallo,
try:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

https://autohotkey.com/docs/commands/Block.htm

Return to “Ask For Help”

Who is online

Users browsing this forum: 3rne5t0 and 86 guests