找回密码
 加入
搜索
查看: 14942|回复: 26

[AU3基础] 寻找Au3Info.exe源码

[复制链接]
发表于 2009-5-31 23:12:40 | 显示全部楼层 |阅读模式
本帖最后由 lynfr8 于 2010-11-12 01:09 编辑

让你是失望了,不是公布这个au3窗口信息查看工具的源码
而是本人急需这个源码
已经问过gooker和老大了
一个说是au3写的一个说是c++写的
小人不才不知谁对谁错
但是谁有这个东东的源码或者提供寻找线索的
我连续5天为他加满金钱和奉献

再详细说说在下为何急需这个东东
我在写一个东西

功能就是让‘自动安装脚本编写可视化’
用这个东西可以系统化编写脚本
最大程度避免函数拼写错误和省去复制关键命令的时间
基本一个普通的自动安装脚本一次性几分钟之内可以编写出来并成功编译运行
我写的这个东东目前还是要借助自带的Au3Info.exe来获取窗口信息
这样就太不爽了,我想把它集成进去
单文件即可完成信息获取、脚本编写、脚本编译三大功能
如果是直接打包进去就觉得很不完美

所以,如果你有或者你知道谁有哪里有,请告知我,拜托拜托!
本人发帖求助不多,回复别人问题占绝大部分,少有的发帖求助,各位就能帮就帮了!

PS:本软件就是为au3爱好者而写的,能获得你的帮助,一定署上你的大名!

本帖子中包含更多资源

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

×

评分

参与人数 1金钱 +10 贡献 +5 收起 理由
131738 + 10 + 5

查看全部评分

 楼主| 发表于 2009-5-31 23:14:52 | 显示全部楼层
1楼自用
发表于 2009-5-31 23:35:27 | 显示全部楼层
楼主好像是要开发“按键精灵”!
发表于 2009-5-31 23:41:18 | 显示全部楼层
网上可以查到各种语言编写的窗体信息查看工具的源代码,可是没有AutoIT的!
发表于 2009-5-31 23:45:49 | 显示全部楼层
送给你一个简单的~复杂的就没了~

评分

参与人数 1金钱 +10 贡献 +10 收起 理由
lynfr8 + 10 + 10 谢谢!

查看全部评分

发表于 2009-5-31 23:45:59 | 显示全部楼层
#include <GUIConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

;===============================================================================
;
; Description:      Window Finder 
; Author(s):        Dmitry Yudin (Lazycat)
; Date:             26.10.2007
; Notes:            Used for learning: 
;                   http://www.codeproject.com/dialog/windowfinder.asp 
;===============================================================================

; Initializing resources
Global $CURSOR_TARGET = WriteResource( _
"0x000002000100202000000F001000300100001600000028000000200000004000000001000100000000008000" & _
"00000000000000000000020000000200000000000000FFFFFF0000000000000000000000000000000000000000" & _
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
"00000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" & _
"FFFFFFF83FFFFFE6CFFFFFD837FFFFBEFBFFFF783DFFFF7EFDFFFEAC6AFFFEABAAFFFE0280FFFEABAAFFFEAC6A" & _
"FFFF7EFDFFFF783DFFFFBEFBFFFFD837FFFFE6CFFFFFF83FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" & _
"FFFFFFFFFFFFFFFFFFFFFFFF")
Global $ICON_TARGET_FULL = WriteResource( _
"0x0000010001002020080000000000E80200001600000028000000200000004000000001000400000000000002" & _
"000000000000000000001000000010000000000000000000800000800000008080008000000080008000808000" & _
"00C0C0C000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000000000000000" & _
"00000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFF" & _
"FFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFF00000FFFFFFFFFFFF000FFFFFFFFFF00FF0FF00FFFFFFFFFF000FF" & _
"FFFFFFF0FF00000FF0FFFFFFFFF000FFFFFFFF0FFFFF0FFFFF0FFFFFFFF000FFFFFFF0FFFF00000FFFF0FFFFFF" & _
"F000FFFFFFF0FFFFFF0FFFFFF0FFFFFFF000FFFFFF0F0F0FF000FF0F0F0FFFFFF000FFFFFF0F0F0F0FFF0F0F0F" & _
"0FFFFFF000FFFFFF0000000F0F0000000FFFFFF000FFFFFF0F0F0F0FFF0F0F0F0FFFFFF000FFFFFF0F0F0FF000" & _
"FF0F0F0FFFFFF000FFFFFFF0FFFFFF0FFFFFF0FFFFFFF000FFFFFFF0FFFF00000FFFF0FFFFFFF000FFFFFFFF0F" & _
"FFFF0FFFFF0FFFFFFFF000FFFFFFFFF0FF00000FF0FFFFFFFFF000FFFFFFFFFF00FF0FF00FFFFFFFFFF000FFFF" & _
"FFFFFFFF00000FFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF0" & _
"00FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000007770CCCCCCCCCCCCCCCCCCCC" & _
"C07770007070CCCCCCCCCCCCCCCCCCCCC07070007770CCCCCCCCCCCCCCCCCCCCC0777000000000000000000000" & _
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
"000000000000000000FFFFFFFF8000000080000000800000008000000080000000800000008000000080000000" & _
"800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080" & _
"0000008000000080000000800000008000000080000000800000008000000080000000FFFFFFFFFFFFFFFFFFFF" & _
"FFFF")
Global $ICON_TARGET_EMPTY = WriteResource( _
"0x0000010001002020080000000000E80200001600000028000000200000004000000001000400000000000002" & _
"000000000000000000001000000010000000000000000000800000800000008080008000000080008000808000" & _
"00C0C0C000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000000000000000" & _
"00000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFF" & _
"FFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FF" & _
"FFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFF" & _
"F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFF" & _
"FFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFF" & _
"FFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFF" & _
"FFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFF" & _
"FFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF0" & _
"00FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000007770CCCCCCCCCCCCCCCCCCCC" & _
"C07770007070CCCCCCCCCCCCCCCCCCCCC07070007770CCCCCCCCCCCCCCCCCCCCC0777000000000000000000000" & _
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
"000000000000000000FFFFFFFF8000000080000000800000008000000080000000800000008000000080000000" & _
"800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080" & _
"0000008000000080000000800000008000000080000000800000008000000080000000FFFFFFFFFFFFFFFFFFFF" & _
"FFFF")

; Loading cursor from file
$hTargetCursor = DllCall("User32.dll", "int", "LoadCursorFromFile", "str", $CURSOR_TARGET)
$hTargetCursor = $hTargetCursor[0]

Global $g_StartSearch = False, $gFoundWindow = 0, $gOldCursor
;~ Global $WM_MOUSEMOVE = 0x200
;~ Global $WM_LBUTTONUP = 0x202

#Region ### START Koda GUI section ### Form=
$hGUI = GUICreate("Window Finder", 586, 104, -1, -1)
GUICtrlCreateGroup("Target", 80, 0, 497, 65)
GUICtrlCreateLabel("Title:", 101, 18, 27, 17, $SS_RIGHT)
GUICtrlCreateLabel("Handle:", 87, 42, 41, 17, $SS_RIGHT)
$hLabelTitle = GUICtrlCreateLabel("", 133, 18, 436, 17, BitOR($SS_CENTER,$SS_RIGHT,$SS_GRAYFRAME,$SS_WHITEFRAME,$SS_SIMPLE))
$hLabelWnd = GUICtrlCreateLabel("", 133, 42, 100, 17)
GUICtrlCreateLabel("Class:", 240, 42, 32, 17)
$hLabelClass = GUICtrlCreateLabel("", 272, 42, 300, 17, BitOR($SS_CENTER,$SS_RIGHT,$SS_GRAYFRAME,$SS_WHITEFRAME,$SS_SIMPLE))
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", 8, 0, 65, 65)
$hTargetPic = GUICtrlCreateIcon($ICON_TARGET_FULL, 0, 24, 20, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
GUICtrlCreateGroup("", -99, -99, 1, 1)
$hOK = GUICtrlCreateButton("Close", 504, 72, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

GUIRegisterMsg ($WM_MOUSEMOVE, "WM_MOUSEMOVE_FUNC")
GUIRegisterMsg ($WM_LBUTTONUP, "WM_LBUTTONUP_FUNC")

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE, $hOK
            Exit
        Case $hTargetPic
            $g_StartSearch = True
            DllCall("user32.dll", "hwnd", "SetCapture", "hwnd", $hGUI)
            $gOldCursor = DllCall("user32.dll", "int", "SetCursor", "int", $hTargetCursor)
            If not @error Then $gOldCursor = $gOldCursor[0]
            GUICtrlSetImage($hTargetPic, $ICON_TARGET_EMPTY)
    EndSwitch
Wend

Func WM_MOUSEMOVE_FUNC($hWnd, $nMsg, $wParam, $lParam)
    If not $g_StartSearch Then Return 1
    Local $mPos = MouseGetPos()
    $hWndUnder = DllCall("user32.dll", "hwnd", "WindowFromPoint", "long", $mPos[0], "long", $mPos[1])
    If not @error Then $hWndUnder = $hWndUnder[0]
    If CheckFoundWindow($hWndUnder) Then
        GUICtrlSetData($hLabelTitle, WinGetTitle($hWndUnder))
        GUICtrlSetData($hLabelWnd, $hWndUnder)
        GUICtrlSetData($hLabelClass, GetWindowClass($hWndUnder))
        $gFoundWindow = $hWndUnder
    EndIf
    Return 1
EndFunc

Func WM_LBUTTONUP_FUNC($hWnd, $nMsg, $wParam, $lParam)
    If not $g_StartSearch Then Return 1
    $g_StartSearch = False
    ; Release captured cursor
    DllCall("user32.dll", "int", "ReleaseCapture")
    DllCall("user32.dll", "int", "SetCursor", "int", $gOldCursor)
    GUICtrlSetImage($hTargetPic, $ICON_TARGET_FULL)
    Return 1
EndFunc

Func CheckFoundWindow($hFoundWnd)
  If $hFoundWnd = $hGUI Then Return False
  If $hFoundWnd = 0 Then Return False
  If $hFoundWnd = $gFoundWindow Then Return False
  If not WinExists($hFoundWnd) Then Return False
  Local $hTemp = DllCall("user32.dll", "hwnd", "GetParent", "hwnd", $hFoundWnd)
  If not @error and $hTemp[0] = $hGUI Then Return False
  Return True
EndFunc

Func GetWindowClass($hWnd)
    $pClassName = DllStructCreate("char[256]")
    DllCall("user32.dll", "int", "GetClassName", "hwnd", $hWnd, "ptr", DllStructGetPtr($pClassName), "int", 255)
    Return DllStructGetData($pClassName, 1)
EndFunc

Func WriteResource($sbStringRes)
    Local $sTempFile
    Do
        $sTempFile = @TempDir & "\temp" & Hex(Random(0, 65535), 4)
    Until not FileExists($sTempFile)
    Local $hFile = FileOpen($sTempFile, 2+16)
    FileWrite($hFile, $sbStringRes)
    FileClose($hFile)
    Return $sTempFile
EndFunc

Func OnAutoitExit()
    If IsDeclared("CURSOR_TARGET") Then
        FileDelete($ICON_TARGET_FULL)
        FileDelete($ICON_TARGET_EMPTY)
        FileDelete($CURSOR_TARGET)
    EndIf
EndFunc

评分

参与人数 1金钱 +15 贡献 +10 收起 理由
lynfr8 + 15 + 10 虽不是我要的源码,也谢谢了!

查看全部评分

发表于 2009-5-31 23:58:06 | 显示全部楼层
纯顶一下,做出来后记得分享啊!
 楼主| 发表于 2009-6-1 01:01:01 | 显示全部楼层
本帖最后由 lynfr8 于 2009-6-1 13:25 编辑

破帽遮颜 给的代码过已经很好了,谢谢先
我目前研究紧论坛那个窗口魔术手,借鉴一下其中的代码
发表于 2009-6-1 03:14:19 | 显示全部楼层
我来顶起............
 楼主| 发表于 2009-6-4 02:39:27 | 显示全部楼层
楼主好像是要开发“按键精灵”!
lixiang 发表于 2009-5-31 23:35


没兴趣搞那些玩意
我写的这个东西是需要au3基础的人才懂用的
是辅助性质的工具
你都没看我的说明
发表于 2009-6-4 08:29:36 | 显示全部楼层
没兴趣搞那些玩意
我写的这个东西是需要au3基础的人才懂用的
是辅助性质的工具
你都没看我的说明
lynfr8 发表于 2009-6-4 02:39


呵呵,好像已经有了AU3Recorder!
发表于 2009-6-4 09:13:46 | 显示全部楼层
顶起来,期待楼主大作出炉
发表于 2009-6-4 10:41:26 | 显示全部楼层
来顶一下,界面不错,什么时候出下载
发表于 2009-6-4 13:38:58 | 显示全部楼层
应该是C++写的,有的话发我一份哦,学习一下。。
 楼主| 发表于 2009-6-4 13:44:19 | 显示全部楼层
呵呵,好像已经有了AU3Recorder!
lixiang 发表于 2009-6-4 08:29


那个模拟鼠标点击的工具没太大意义
不修改sleep的话自动点击慢,而且由于分辨率问题生成的脚本通用性不强,自用就勉强呗
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-15 10:54 , Processed in 0.087432 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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