为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

Autoit检查单复选框的选中状态

2017-09-26 4页 doc 17KB 55阅读

用户头像

is_594905

暂无简介

举报
Autoit检查单复选框的选中状态Autoit检查单复选框的选中状态 Autoit #AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include #include #include Opt("MustDeclareVars", 1) Global $iMemo _Main() Func _Main() Local $rdo, $rdo2, $chk GUICreate("Buttons", 400, 400) $iMemo = GUICtr...
Autoit检查单复选框的选中状态
Autoit检查单复选框的选中状态 Autoit #AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include #include #include Opt("MustDeclareVars", 1) Global $iMemo _Main() Func _Main() Local $rdo, $rdo2, $chk GUICreate("Buttons", 400, 400) $iMemo = GUICtrlCreateEdit("", 119, 10, 276, 374, $WS_VSCROLL) GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New") $rdo = GUICtrlCreateRadio("Radio1", 10, 10, 90, 50) $rdo2 = GUICtrlCreateRadio("Radio2", 10, 60, 90, 50) _GUICtrlButton_SetCheck($rdo2) _GUICtrlButton_SetFocus($rdo2) ; set focus, shows this doesn't affect _GUICtrlButton_GetCheck $chk = GUICtrlCreateCheckbox("Check1", 10, 120, 90, 50, BitOR($BS_AUTO3STATE, $BS_NOTIFY)) _GUICtrlButton_SetCheck($chk, $BST_INDETERMINATE) GUISetState() MemoWrite("$rdo checked status.: " & @CRLF & @TAB & _ExplainCheckState(_GUICtrlButton_GetCheck($rdo)) & @CRLF) MemoWrite("$rdo2 checked status: " & @CRLF & @TAB & _ExplainCheckState(_GUICtrlButton_GetCheck($rdo2)) & @CRLF) MemoWrite("$chk checked status.: " & @CRLF & @TAB & _ExplainCheckState(_GUICtrlButton_GetCheck($chk)) & @CRLF) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Exit EndFunc ;==>_Main ; Write a line to the memo control Func MemoWrite($sMessage) GUICtrlSetData($iMemo, $sMessage & @CRLF, 1) EndFunc ;==>MemoWrite Func _ExplainCheckState($iState) Switch $iState Case $BST_CHECKED Return "Button is checked." Case $BST_INDETERMINATE Return "Button is grayed, indicating an indeterminate state (applies only if the button has the $BS_3STATE or $BS_AUTO3STATE style)." Case $BST_UNCHECKED Return "Button is cleared" EndSwitch EndFunc ;==>_ExplainCheckState _GUICtrlButton_GetCheck 得到单选按钮或者复选框选中状态 #Include _GUICtrlButton_GetCheck($hWnd) $hWnd Handle to the control Success: The return value from a button created with the $BS_AUTOCHECKBOX, $BS_AUTORADIOBUTTON, $BS_AUTO3STATE, $BS_CHECKBOX, $BS_RADIOBUTTON, or $BS_3STATE style can be one of the following: $BST_CHECKED - Button is checked. $BST_INDETERMINATE - Button is grayed, indicating an indeterminate state (applies only if the button has the $BS_3STATE or $BS_AUTO3STATE style). $BST_UNCHECKED Button is cleared Failure: 0 If the button has a style other than those listed, the return value is zero.
/
本文档为【Autoit检查单复选框的选中状态】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索