找回密码
 加入
搜索
查看: 1731|回复: 4

如何获取鼠标下的控件标识

[复制链接]
发表于 2009-11-18 15:18:44 | 显示全部楼层 |阅读模式
我用GUIGetCursorInfo只能获取listview的标识,不能获取子列表的标识
发表于 2009-11-18 16:05:12 | 显示全部楼层
#Include <GuiListView.au3>
_GUICtrlListView_HitTest($hWnd[, $iX = -1[, $iY = -1]])
 楼主| 发表于 2009-11-19 16:02:44 | 显示全部楼层
不行呀,如果真可以,麻烦大师说的再详细些好吗?谢谢了
发表于 2009-11-19 16:13:11 | 显示全部楼层
Re 3#:
不行?为何不直接把你的代码贴出来,让诸位明白为何不行?
 楼主| 发表于 2009-11-23 11:00:48 | 显示全部楼层
本帖最后由 fy1126 于 2009-11-23 11:03 编辑

回复 4# pusofalse


    #include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
;Opt("GUIOnEventMode",1);设置窗体事件响应方式为  :事件模式。
const $hhjg=1500;定义喊话间隔
;定义一个数组,并赋值,用于保存输入代码
Dim $sj[676]

#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("DNF自动喊话工具——制作:胡天发——QQ:752481409", 491, 450, 192, 124)
$Label1 = GUICtrlCreateLabel("DNF自动喊话工具", 136, 8, 193, 28)
GUICtrlSetFont(-1, 18, 800, 0, "楷体_GB2312")
$Label2 = GUICtrlCreateLabel("警告:凡不是从QQ:752481409处购买的均为盗版,小心盗号", 16, 40, 465, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$Group1 = GUICtrlCreateGroup("", 16, 352, 457, 89)
$Radio1 = GUICtrlCreateRadio("附近", 20, 412, 73, 17)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$Radio2 = GUICtrlCreateRadio("公会", 92, 412, 73, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$Radio3 = GUICtrlCreateRadio("商店", 164, 412, 73, 17)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$Radio4 = GUICtrlCreateRadio("带人", 236, 412, 73, 17)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$Input1 = GUICtrlCreateInput("单带禁地王5W,去的速度", 20, 372, 329, 32)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$But_baocun = GUICtrlCreateButton("保 存", 376, 374, 75, 25, $WS_GROUP)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$But_yingcang = GUICtrlCreateButton("隐 藏", 376, 408, 75, 25, $WS_GROUP)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$Radio5 = GUICtrlCreateRadio("顺序", 312, 405, 41, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Radio6 = GUICtrlCreateRadio("随机", 312, 423, 41, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
;创建一个树状列表框,用于查看喊话信息
$TreeView1 = GUICtrlCreateTreeView(16, 64, 457, 289, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS, $TVS_CHECKBOXES, $TVS_INFOTIP, $TVS_FULLROWSELECT, $TVS_NOSCROLL, $WS_GROUP, $WS_TABSTOP, $WS_BORDER))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetTip(-1, "双击鼠标左键发送选中的喊话。", "小提示", 1);显示提示信息
$Tv_fj = GUICtrlCreateTreeViewItem("附近", $TreeView1)
$Tv_gh = GUICtrlCreateTreeViewItem("工会", $TreeView1)
$Tv_gh1 = GUICtrlCreateTreeViewItem("公会即将升级请朋友们帮忙捐助点,多少是个意思", $Tv_gh)
$Tv_sd = GUICtrlCreateTreeViewItem("商店", $TreeView1)
$Tv_sd1 = GUICtrlCreateTreeViewItem("粉装、紫装各色晶体便宜处理。要的速度", $Tv_sd)
$Tv_sd2 = GUICtrlCreateTreeViewItem("工会升级缺钱,特便宜处理各种装备、消耗品", $Tv_sd)
$Tv_dr = GUICtrlCreateTreeViewItem("带人", $TreeView1)

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


For $m = 0 To 25
        For $n = 0 To 25
                $sj[$m * 26 + $n] = Chr($m + 97) & Chr($n + 97)
        Next
Next
;end______________定义一个数组,并赋值,用于保存输入代码
$i = 1
Dim $sl[250][250]
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $But_baocun

                Case $But_yingcang
                        WinSetState("", "", @SW_HIDE)
                        ;WinSetState("", "", @SW_HIDE)
                        ;GUICtrlSetOnEvent ( $Tv_gh1, "cs" )
                Case $Tv_gh1
                        MsgBox("", "", GUICtrlRead($Tv_gh1, 1))
                Case $Tv_sd1
                        MsgBox("", "", GUICtrlRead($Tv_sd1, 1))
                Case $Tv_sd2
                        MsgBox("", "", GUICtrlRead($Tv_sd2, 1))
                case $GUI_EVENT_PRIMARY
                        MsgBox("", "", "双击")
        EndSwitch
        HotKeySet("{numpadadd}", "hanhua")
        HotKeySet("{numpadMULT}", "writsogou")
        HotKeySet("{NUMPADSUB}", "degdv");喊话热键
WEnd

我想让程序左键双击发送listview里的选择的内容。右键执行更改,删除listview的内容
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-27 03:10 , Processed in 0.077584 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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