1
我正在腳本中讀取文件中的用戶名和密碼以使部署更加痛苦,因爲否則我必須爲每個部署提供用戶名和密碼。我是AutoIT的新手,我只是RTFM,下面是我得到的,因爲我是一個新手,我敢肯定,你可以找到我做錯了什麼,但以下是爲我做的工作以更好的方式比在回答這個問題之前:Scitpting AutoIT從文件中讀取用戶名和密碼
Local $sLauncherPath = "C:\Program Files (x86)\Google\google_appengine\launcher\GoogleAppEngineLauncher.exe"
Local $iPid = Run($sLauncherPath)
Local $hWin
While ProcessExists($iPid)
$hWin = WinWait("Deploy Application to Google", "", 1)
Local $file = FileOpen("C:\Program Files (x86)\Google\google_appengine\launcher\settings.dat", 0)
Local $line = FileReadLine($file, 1)
Local $line2 = FileReadLine($file, 2)
If $hWin And WinGetProcess($hWin) = $iPid Then
ControlSetText($hWin, "", "Edit1", $line)
ControlSetText($hWin, "", "Edit2", $line2)
ControlClick($hWin, "", "Button2")
WinWaitClose($hWin)
EndIf
WEnd
這似乎爲我工作,你可以把可能的改進建議,因爲這僅僅是我的第二個項目的AutoIt?
退房http://codereview.stackexchange.com/ – banging