friendtasy 发表于 2011-7-20 22:08:03

au3真正要用于大型商业开发,还有阻碍呀:

一,太容易被反编辑了
二,不直接支持多线程,特别是现在的大 ...
happytc 发表于 2011-7-20 20:53 http://www.autoitx.com/images/common/back.gif

学AU3的很少想拿来开发大型商业软件的。任何语言都有其适用范围。

netegg 发表于 2011-7-21 05:46:47

学AU3的很少想拿来开发大型商业软件的。任何语言都有其适用范围。
friendtasy 发表于 2011-7-20 22:08 http://www.autoitx.com/images/common/back.gif
同意,什么东西都有最适用它的范围,何必要把一种其他语言可以更好完成的事交给另一种完成起来相对不尽如人意的语言去做呢?
打个比方,大型数据库,大型动态网站,谁又会想到用auto去完成全部功能,不但浪费时间,而且效率也是问题

jinyue115 发表于 2011-7-21 13:22:26

同意 。适合做自动化测试

yarsye 发表于 2011-7-22 16:46:02

Marking !!!

bluesky4485 发表于 2011-7-27 09:34:03

个人兴趣,想学,不过还没有入门。

有色眼镜 发表于 2011-7-28 13:23:13

个人爱好多一些吧!!可是总是专不了心去学这!

wa18239 发表于 2011-7-28 13:41:56

水平有限,写不出什么好东西。自己弄弄。

yarsye 发表于 2011-7-28 17:11:42

Tracking !

pusofalse 发表于 2011-7-29 04:37:31

打算用AutoIt写一个比Windows还优秀的操作系统。

jinyue115 发表于 2011-7-29 10:38:30

回复 54# pusofalse
请教P版:
我在学习使用您 <LocalSecurityAuthority.au3>时 ,遇到了一点问题,小弟研究了很久也在网上搜索了相关帖子没有和我遇到类似的问题的,所以想请教您关于这两个函数的使用。

目的:自动卸载摄像头驱动
函数: _CM_Get_Device_ID_By_Name_Ex,_SetupDiCreateDeviceDevs,_SetupDiDisableDevice
产生背景:当卸载摄像头驱动时,提示需要拔掉camera,所以我就想先disable然后再remove掉这个摄像头最后达到卸载驱动的效果。当我插上摄像头时,在设备管理器里面会在audio和video两处显示同样的设备名,不同的是两个的PID不同
问题产生:当我用上面三个函数时,发现只能disable、remove掉audio的那个部分,video那部分还在。
分析对比:当我停用鼠标键盘时,是没有任何问题的,但是当我停用摄像头时就出现问题了。
问题研究:当我用 _CM_Get_Device_ID_By_Name_Ex函数通过名字获取ID时,只是能得到第一个ID,不能全部都返回,也就不能全部都disable了。

麻烦P版有时间给看看,谢谢了。

粗略代码请看下面:#include <TreeViewConstants.au3>
#include <GUITreeView.au3>
#include <GuiToolBar.au3>
#include <SetupApi.au3>

Local $TitleInDM,$sDeviceId, $hDevs, $tDevInfo

jinyue115 发表于 2011-7-29 10:39:09

粗略代码请看下面:#include <TreeViewConstants.au3>
#include <GUITreeView.au3>
#include <GuiToolBar.au3>
#include <SetupApi.au3>

Local $TitleInDM,$sDeviceId, $hDevs, $tDevInfo
       
$TitleInDM = "HID Keyboard Device";这里如果有两个device名字是一样的,只返回第一个deviceID
$sDeviceId = _CM_Get_Device_ID_By_Name_Ex($TitleInDM)
If $sDeviceId == "" Then Exit

; Obtain a handle to device information set.
_SetupDiCreateDeviceDevs($sDeviceId, $hDevs, $tDevInfo)

; The following 4 calls always returns True if succeeds without an error.
_SetupDiDisableDevice($hDevs, $tDevInfo, 1)      ; Disable
Sleep(5000)
_SetupDiDisableDevice($hDevs, $tDevInfo, 0)      ; Enable
Sleep(5000)
_SetupDiRemoveDevice($hDevs, $tDevInfo, 1)      ; Forcibly remove this device
Sleep(5000)
_CM_Scan_Device_Changes("")      ; Detect the device that has been removed from your system.

;Release handle and vars.
_SetupDiDestroyDeviceInfoList($hDevs)
_SetupDiApiBufferFree($tDevInfo); #### FUNCTION ####
; ================================================================================
; Name        : _CM_Get_Device_ID_By_Name_Ex
; Description        : Specifies a device friendly name (or device description), retrieves the device instance ID binds to this name.
; Parameter(s)        : $sFriendlyName        - Specifies a device friendly name, or description.
;                : $fMatchAll        - A value of TRUE indicates the full words is matched, default to TRUE.
;                : $sDeviceID        - Device identifier string of the device from which the match is started, can be NULL.
;                : $hMachine        - Supplies a machine handle, on which the function to execute, default to local.
; Return values        : If a device instance is matched, the return value is set to the device instance identifier, otherwise returns NULL.
; Author        : Pusofalse
; ================================================================================
Func _CM_Get_Device_ID_By_Name_Ex($sFriendlyName, $fMatchAll = True, $sDeviceID = "", $hMachine = 0)
        Local $aChild, $sDescr, $sName, $hDevInst, $sVal

        If IsString($sDeviceID) = 0 Then
                $hDevInst = $sDeviceID
        Else
                $hDevInst = _CM_Locate_DevNode_Ex($sDeviceID, $hMachine)
        EndIf
        $aChild = _CM_Enumerate_Children_Ex($hDevInst, $hMachine)

        For $i = 1 To $aChild
                $hDevInst = _CM_Locate_DevNode_Ex($aChild[$i], $hMachine)
                $sDescr = _CM_Get_DevNode_Registry_Property_Ex($hDevInst, 1, $hMachine)
                $sName = _CM_Get_DevNode_Registry_Property_Ex($hDevInst, 0xD, $hMachine)
                If $sName <> "" Then $sDescr = $sName
                If $sDescr = "" Then $sDescr = ""
                If $fMatchAll Then
                        If $sDescr = $sFriendlyName Then Return $aChild[$i];我把这里换成msgbox发现可以显示两个deviceID,但是不懂为什么只返回一个?
                Else
                        If StringInStr($sDescr, $sFriendlyName) Then Return $aChild[$i]
                EndIf
                $sVal = _CM_Get_Device_ID_By_Name_Ex($sFriendlyName, $fMatchAll, $hDevInst, $hMachine)
                If $sVal <> "" Then Return $sVal;把这里换成msgbox发现这个递归会调用很多次
        Next
        Return ""
EndFunc        ;==>_CM_Get_Device_ID_By_Name_Ex

yarsye 发表于 2011-7-29 15:04:55

Update ing ...

itljl 发表于 2011-7-29 21:24:31

写点小程序

asdasdasd 发表于 2011-7-30 00:43:18

呵呵,我也来参与一下;
语言学了不少,象VB,C语言,C++,但都没有深入,都是写写算法什么的,没有实战开发应用;
由于有BASIC语言的基础,AU3呢,很快就上手了,语言简练,函数功能集成度高,在C里面要写一堆的代码,都已经在这里面写好了,一条语句就搞定,方便得很,写写一般的小工具足够了,速度又快,就已经相当于一个很完善的库了;再加上对DLL的调用支持,以及大家的功能扩充,也能实现很多功能了;
缺点就是,反编译,解释执行,体积过大这几个硬伤,其他还好,看拿做什么用吧!

minterz 发表于 2011-7-30 11:10:19

自己用的..
页: 1 2 3 [4] 5 6
查看完整版本: 统计下大家都拿AutoIT做什么?目的为何?有何用途?