# IF Or, AND Commands

## Recommended Posts

```Func connectbekleme()
\$x1 = 0
\$y1 = 0
Do
\$arama3 = _ImageSearch("Images\connect.bmp", 1, \$x1, \$y1, 0)
\$arama3xb = _ImageSearch("Images\connect2.bmp", 1, \$x1, \$y1, 0)
If \$arama3 = 1 Or \$arama3xb = 1 Then
Else
Sleep(1000)
EndIf
Until \$arama3 = 1 Or \$arama3xb = 1
EndFunc ;==>connectbekleme```

if \$arama3 = 1 Or \$arama3xb =1 Then not running whats wrong?

Edited by DeSwa

##### Share on other sites

What is _ImageSearch?

When you post a question, why not try and post a working example... so we don't just throw guess out.

Guess 1:

```Func connectbekleme()
\$x1 = 0
\$y1 = 0
Do
\$arama3 = _ImageSearch("Images\connect.bmp", 1, \$x1, \$y1, 0)
\$arama3xb = _ImageSearch("Images\connect2.bmp", 1, \$x1, \$y1, 0)
MsgBox(64, "Try Debugging!", "\$arama3 value: " & \$arama3 & @CRLF & "\$arama3xb value: " & \$arama3xb)
If \$arama3 = 1 Or \$arama3xb = 1 Then
Else
Sleep(1000)
EndIf
Until \$arama3 = 1
EndFunc  ;==>connectbekleme```

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

##### Share on other sites

example

this not runing not stop looping

```do

if \$control1 = 1 Or \$control2 =1 then
MsgBox(64, "Try Debugging!", "You select 1 or 2")
else
end if
until \$control1 =1 Or \$control2 =1```

this work

```do

if \$control1 = 1 then
MsgBox(64, "Try Debugging!", "You select 1")
else
end if
until \$control1 =1```

whats wrong sorry bad my english.

##### Share on other sites

example

this not runing not stop looping

```do

if \$control1 = 1 Or \$control2 =1 then
MsgBox(64, "Try Debugging!", "You select 1 or 2")
else
end if
until \$control1 =1 Or \$control2 =1```

this work

```do

if \$control1 = 1 then
MsgBox(64, "Try Debugging!", "You select 1")
else
end if
until \$control1 =1```

whats wrong sorry bad my english.

Again, you're not posting code anyone can run.

```Global \$chkbox1, \$chkbox2, \$read1, \$read2
GUICreate("Checkbox")

\$chkbox1 = GUICtrlCreateCheckbox("CHECKBOX 1", 10, 10, 120, 20)
\$chkbox2 = GUICtrlCreateCheckbox("CHECKBOX 2", 10, 40, 120, 30)

GUISetState()
Do
Until \$read1 = 1 Or \$read2 = 1 Or GUIGetMsg() = -3
MsgBox(64, "Info", "Checkbox 1 Checked = " & (\$read1 = 1) & @CRLF & _
"Checkbox 2 Checked = " & (\$read2 = 1))```

Works fine.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...