找回密码
 加入
搜索
查看: 3092|回复: 6

[AU3基础] 如何选择下拉列表的某一项?

  [复制链接]
发表于 2010-5-5 20:15:22 | 显示全部楼层 |阅读模式
在运行某个应用程序的时候,怎么选择下拉列表的某一项?
如图片,我怎么能直接选择Custom ?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2010-5-5 20:57:53 | 显示全部楼层
希望大家帮帮忙,我很着急!
发表于 2010-5-5 21:08:58 | 显示全部楼层
#include <GUIConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 290, 150, 192, 124)
$Combo1 = GUICtrlCreateCombo("", 64, 56, 169, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "这是第一个|2|3|4|5|6")
ControlSetText($Form1,"",$Combo1,"2")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd
代码如上
 楼主| 发表于 2010-5-6 09:00:31 | 显示全部楼层
回复 3# lanfengc


    谢谢啊!
    如果是某个应用程序,自动运行,如何直接选择custom执行下一步啊?
发表于 2010-5-6 12:31:58 | 显示全部楼层
ControlSetText($Form1,"",$Combo1,"2")
看看这个函数的用法。
发表于 2010-5-7 00:37:37 | 显示全部楼层
代码如上
lanfengc 发表于 2010-5-5 21:08



    你这样解释大家不都明白了吗?谢谢,你是好人。
发表于 2010-5-7 07:08:26 | 显示全部楼层
很好,记下!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-6-1 16:12 , Processed in 0.076865 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表