Jump to content
Sign in to follow this  
DeSwa

IF Or, AND Commands

Recommended Posts

DeSwa

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 this post


Link to post
Share on other sites
SmOke_N

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 this post


Link to post
Share on other sites
DeSwa

example

this not runing not stop looping

do
$control1 = GUICtrlRead($checkbox1)
$control2 = GUICtrlRead($checkbox2)

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
$control1 = GUICtrlRead($checkbox1)

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

whats wrong sorry bad my english.

Share this post


Link to post
Share on other sites
SmOke_N

example

this not runing not stop looping

do
$control1 = GUICtrlRead($checkbox1)
$control2 = GUICtrlRead($checkbox2)

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
$control1 = GUICtrlRead($checkbox1)

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
    $read1 = GUICtrlRead($chkbox1)
    $read2 = GUICtrlRead($chkbox2)
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.

Share this post


Link to post
Share on other sites

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

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×