我有下面的腳本,但沒有成功執行它沒有錯誤。我想把一個變量放到一個URL中並且ping那個URL。變量字符串
#include <Excel.au3>
$sFilePath1 = "D:\Desktop\1.xlsx"
$oExcel = _ExcelBookOpen($sFilePath1, 0)
For $i = 1 To 2 ; Loop
Local $username = _ExcelReadcell($oExcel, $i, 1) ;Reading created Excel
Local $iPing = Ping("http://blogsearch.google.co.in/ping?url="$username"&btnG=Submit+Blog&hl=en", 2500)
If $iPing Then ; If a value greater than 0 was returned then display the following message.
MsgBox(0, "STATUS", "Ping Successful", 1)
Else
MsgBox(0, "STATUS", "ERROR", 1)
EndIf
Next
您好,歡迎來SO。請添加一些更多的細節,比如您獲得的錯誤和期望的輸出。 – thomaux
而不是「$ username」,它必須從excel中獲取url並ping整個url。 – user3282817
本地$ iPing =平( 「http://blogsearch.google.co.in/ping?url=」 $用戶名 「和btnG =提交+博客&HL = EN」,2500)本地$ iPing =平(「HTTP:// blogsearch.google.co.in/ping?url=www.facebook.com&btnG=Submit+Blog&hl=en「,2500) – user3282817