Jump to content


Recommended Posts

what is the return script for checkbox?

if $tick = False then 
                        _IECreate("http://www.google.com", 0, 1 , 0, 0)
                 _IECreate("http://videos.google.com", 0, 1 , 0, 0)
Link to comment
Share on other sites

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)

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

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

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


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
Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...