Sign in to follow this  
Followers 0
Gif

checkbox

4 posts in this topic

what is the return script for checkbox?

if $tick = False then 
                        _IECreate("http://www.google.com", 0, 1 , 0, 0)
                    Else    
                 _IECreate("http://videos.google.com", 0, 1 , 0, 0)
                     sleep(1000)
                     Exit
       endif

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

Do you mean in a GUI or one of those Google web pages? :)

If you mean to test a checkbox on a GUI:

#include <guiconstants.au3>

$WinTitle = "CheckBox Check"
$WinText = ""

;Create GUI
$hGui = GUICreate($WinTitle, 200, 100)
$CtrlId = GUICtrlCreateCheckbox("This is my checkbox", 10, 10, 180, 30)
$Check = GUICtrlCreateButton("Check", 33, 50, 50, 30)
$Quit = GUICtrlCreateButton("Quit", 117, 50, 50, 30)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Quit
            Exit
        Case $Check
            ; Method one
            If BitAND(GUICtrlRead($CtrlId), $GUI_CHECKED) Then
                MsgBox(64, "Method One", "It's checked!")
            Else
                MsgBox(64, "Method One", "It is not checked.")
            EndIf

            ; ...or method two
            If ControlCommand($WinTitle, $WinText, $CtrlId, "IsChecked") Then
                MsgBox(64, "Method Two", "It's checked!")
            Else
                MsgBox(64, "Method Two", "It is not checked.")
            EndIf
    EndSwitch
WEnd

If you mean on a web page, look at the IE.au3 functions.

:D

Edit: More complete demo... with GuiCtrlRead() fixed... :">

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Ok !!!

Share this post


Link to post
Share on other sites

Ok !!!

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  
Followers 0