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 ,經本人測試也毫無問題。
、、權、譬如:系統版本的預設置不同和日積月累的操作的「不經意的變更」導致組策略或者注冊表的相關限制,系統自身防火牆的級別,以及非常規安裝和卸載引起的運行環境所需重要資料庫文件的損壞或缺失,導致再次安裝環境的阻滯和崩潰,、、、等等。
過多的時候,內因不明,同一情形不能一概而論,於情無助。