Windows 自動登入免密碼

方法一:
1.執行 netplwiz
2. 在使用者帳戶的視窗中,取消 「必須輸入使用者名稱和密碼,才能使用這台電腦」,套用後選擇要自動登入的帳戶,並輸入選擇帳戶的密碼。
方法二:
1.Windows+R   > 開起執行
2.執行 rundll32 netplwiz.dll,UsersRunDll
3.在使用者帳戶的視窗中,取消 「必須輸入使用者名稱和密碼,才能使用這台電腦」,套用後選擇要自動登入的帳戶,並輸入選擇帳戶的密碼。

AutoIT 檢查網路連線狀態

基本檢查:
Global Const $NETWORK_ALIVE_LAN = 0x1
Global Const $NETWORK_ALIVE_WAN = 0x2
$x =DLLCall("sensapi.dll","int","IsNetworkAlive","str",$NETWORK_ALIVE_LAN)
msgbox (4096,"測試",$x[0])

應用:
While 1 $connect = _GetNetworkConnect()
If $connect Then
    MsgBox(64, "Connections", $connect)
Else
    MsgBox(48, "Warning", "There is no connection")
EndIf
sleep(5000)
Wend
Func _GetNetworkConnect()
    Local Const $NETWORK_ALIVE_LAN = 0x1  ;net card connection
    Local Const $NETWORK_ALIVE_WAN = 0x2  ;RAS (internet) connection
    Local Const $NETWORK_ALIVE_AOL = 0x4  ;AOL
   
    Local $aRet, $iResult
   
    $aRet = DllCall("sensapi.dll", "int", "IsNetworkAlive", "int*", 0)
   
    If BitAND($aRet[1], $NETWORK_ALIVE_LAN) Then $iResult &= "LAN connected" & @LF
    If BitAND($aRet[1], $NETWORK_ALIVE_WAN) Then $iResult &= "WAN connected" & @LF
    If BitAND($aRet[1], $NETWORK_ALIVE_AOL) Then $iResult &= "AOL connected" & @LF
   
    Return $iResult
EndFunc

 應用2:

While 1
$connect = _GetNetworkConnect()
If $connect Then
    MsgBox(64, "Connections", $connect)
Else
    MsgBox(48, "Warning", "There is no connection")
EndIf
sleep(5000)
Wend
Func _GetNetworkConnect()
    Local Const $NETWORK_ALIVE_LAN = 0x1  ;net card connection
    Local Const $NETWORK_ALIVE_WAN = 0x2  ;RAS (internet) connection
    Local Const $NETWORK_ALIVE_AOL = 0x4  ;AOL
   
    Local $aRet, $iResult
   
    $aRet = DllCall("sensapi.dll", "int", "IsNetworkAlive", "int*", 0)
   
    If BitAND($aRet[1], $NETWORK_ALIVE_LAN) Then $iResult &= "LAN connected" & @LF
    If BitAND($aRet[1], $NETWORK_ALIVE_WAN) Then $iResult &= "WAN connected" & @LF
    If BitAND($aRet[1], $NETWORK_ALIVE_AOL) Then $iResult &= "AOL connected" & @LF
   
    Return $iResult
EndFunc

AutoIT UDF(excel.au3)修正

原本的值
Global Const $xlCSVMSDOS = 24
Global Const $xlTextWindows = 20
修改為
Global Const $xlCSVMSDOS = 6
Global Const $xlTextWindows = -4158
修正使用 excel.au3 存檔成 csv 及 txt 檔案格式的問題

AutoIT 內建系統變數

@UserProfileDir
說明: Path to current user's Profile folder.
WinXP: C:\Documents and Settings\UserName
@MyDocumentsDir
說明: path to My Documents target
WinXP: 我的文件實際指向的位置
@ProgramFilesDir
說明: path to Program Files folder
WinXP: C:\Program Files
@TempDir
說明: Path to the temporary files folder.
WinXP: C:\Documents and Settings\UserName\Local Settings\Temp
@UserName
說明: ID of the currently logged on user.
WinXP: 登入系統的使用者名稱