Jump to content
Sign in to follow this  
ckelsoe

Test for IE form checked state using _IsChecked?

Recommended Posts

ckelsoe

Hi, I am trying to see if the checkbox in an IE form is checked.

I have assigned the checkbox name to a variable

$oCommissions = 
_IEFormElementGetObjByName($oForm, "Commissions")

Then I run this code which always returns false"

msgbox(0,"OC Status", _IsChecked($oCommissions))

I found the function _IsChecked on the AutoIt Wiki. Here it is for reference:

Func _IsChecked(Const $iControlID)
    Return BitAND(GUICtrlRead($iControlID), $GUI_CHECKED) = $GUI_CHECKED
EndFunc   ;==>_IsChecked

Your help in clearing up my misunderstanding of this function or my code is appreciated.

 

Share this post


Link to post
Share on other sites
Valuater

This is for an Autoit GUI-Control

_IsChecked()

You need to use...

_IEFormElementCheckBoxSelect()

See the help file for use

Almost all the commands you want to use starts with _IE

8)

  • Like 1

NEWHeader1.png

Share this post


Link to post
Share on other sites
ckelsoe

Duh - that was obvious. Thank You!

If Not $oCommissions.checked Then
            $oCommissions.checked = True
        endif

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  

×