A. 如何用AU3进行字符串匹配
$dic=ObjCreate("scripting.dictionary")
If Not IsObj($dic) Then
MsgBox(0,"错误","创建字典对象失败!")
Exit 0
EndIf
$oexcel=ObjCreate("excel.application")
If Not IsObj($oexcel) Then
MsgBox(0,"错误","创建Excel进程失败!")
Exit 0
EndIf
$oexcel.visible=True
$wb=$oexcel.workbooks.open(@ScriptDir&"\数据库.xlsx")
For $ws In $wb.worksheets
With $ws
$r=.cells(.rows.count,1).end(3).row
If $r>1 Then
$arr=.range("a1").resize($r,2).value
For $n=0 To UBound($arr,2)-1
If $dic.exists($arr[1][$n]) Then
$dic($arr[1][$n])=$dic($arr[1][$n])&@CRLF&$arr[0][$n]
Else
$dic($arr[1][$n])=$arr[0][$n]
EndIf
Next
EndIf
EndWith
Next
$wb.close(False)
$wb=$oexcel.workbooks.open(@ScriptDir&"\需对比文档.xlsx")
For $ws In $wb.worksheets
With $ws
$r=.cells(.rows.count,1).end(3).row
If $r>1 Then
$arr=.range("a1").resize($r,1).value
For $n=0 To UBound($arr,2)-1
If $dic.exists($arr[0][$n]) Then
$arr[0][$n]=$dic($arr[0][$n])
Else
$arr[0][$n]=""
EndIf
Next
.range("b1").resize($r,1).value=$arr
.columns.autofit
.rows.autofit
EndIf
EndWith
Next
MsgBox(0,"","对比完毕!")
$wb.close(true)
$oexcel.quit
$dic=0
B. AUTOIT 连接 oracle 数据库 语句
#include <array.au3>#include "mysql.au3"__MySQL_ExtractEmbeddedDLL()_MySQL_InitLibrary()$MysqlConn = _MySQL_Init();方法1 开始;$connected = _MySQL_Real_Connect($MysqlConn,"localhost","root","asdf1234","gmsj");If $connected = 0 Then; $errno = _MySQL_errno($MysqlConn); MsgBox(0,"Error:",$errno & @LF & _MySQL_error($MysqlConn)); If $errno = $CR_UNKNOWN_HOST Then MsgBox(0,"Error:","$CR_UNKNOWN_HOST" & @LF & $CR_UNKNOWN_HOST);Endif;MsgBox(0, "sda", "ok");方法1 结束$connected = _MySQL_Real_Connect($MysqlConn, "127.0.0.1", "root", "sssss", "data"); _MySQL_Real_Connect($MysqlConn,"服务器IP","账户","密码","数据库名称")If $connected = 0 Then Exit MsgBox(16, 'Connection Error', _MySQL_Error($MysqlConn))$query = "SELECT * FROM CHARACTER_SETS"_MySQL_Real_Query($MysqlConn, $query)$res = _MySQL_Store_Result($MysqlConn)$fields = _MySQL_Num_Fields($res)$rows = _MySQL_Num_Rows($res)MsgBox(0, "data","row:"&$rows & "-" & $fields&"ok")
C. 为什么我的Au3_ins和win7不兼容啊我的是win7(x86).谢谢啊!
为什么我的Au3_ins和win7不兼容啊
这样的问题最好自找原因
确切的说,Au3_ins不但适合 XP86 Vista86 W7 86 就算版XP64 Vista64 W764 ,经本人测试也毫无问题。
、、权、譬如:系统版本的预设置不同和日积月累的操作的“不经意的变更”导致组策略或者注册表的相关限制,系统自身防火墙的级别,以及非常规安装和卸载引起的运行环境所需重要数据库文件的损坏或缺失,导致再次安装环境的阻滞和崩溃,、、、等等。
过多的时候,内因不明,同一情形不能一概而论,于情无助。