定義變量的時候不需要定義類型 ,由於是易語言,變量名可以是中文
文本路徑 = "C:\Users\Administrator\Desktop\1.txt"//改成自己的文本路徑
Text = Plugin.File.ReadFileEx(文本路徑)
MyArray = Split(Text, "|")//以行為單位分拆,已數組形式存放
//RunApp "電腦的文件路徑" 如下面的打開瀏覽器
call RunApp ("C:\Users\Administrator\Desktop\2345加速瀏覽器.lnk")
Delay 200
Hwnd = Plugin.Window.Foreground() //獲得當前窗口的句柄
//Hwnd = Plugin.Window.MousePoint()//獲得鼠標指向窗口句柄
delay 200
Call Plugin.Window.Max(Hwnd) //最大化窗口
Delay 200
Dim a //創建一個新變量
a = 0
//UBOUND 函數返回一個數組的最大下標
If UBound(MyArray)>=0 Then //then前面if的條件
For i=0 to UBound(MyArray)-1
//下面這句是得到文本內容
TracePrint "第 " & i + 1 & " 行文本內容為:" & Cstr(MyArray(i))
MoveTo 550,74//點擊網頁某個地方.自己獲取坐標
Delay 10
LeftClick 1
Delay 1000
MoveTo 805,642 //彈出對話窗,輸入框的坐標.自己獲取
Delay 10
LeftClick 1
Delay 500
KeyDown 17, 1
KeyPress 65, 1
KeyUp 17, 1
SayString MyArray(i)//輸入
Delay 500
KeyPress 9,2
Delay 10
KeyPress 13,1
Delay 1000
If i - a >= 20 Then
MoveTo 29,1056 //點擊網頁某個地方.自己獲取坐標
Delay 10
LeftClick 1
Delay 1000
MoveTo 111,551//彈出對話窗,輸入框的坐標.自己獲取
Delay 10
LeftClick 1
Delay 1500
a = i
End If //結束if語句
//i Mod 80表示:i模80取余數(i%80=i/80的余數)
If i Mod 80 = 0 and i<>0 Then //i<>0 表示:i 不等於 0
Delay 5500000
Call Lib.系統.結束進程("2345Explorer.exe") //關閉所有關於這個的進程
Delay 3000
RunApp "C:\Users\Administrator\Desktop\2345加速瀏覽器.lnk"
End If
Next
End If
---------------------------------
Text1 = Plugin.File.ReadFileEx("C:\Users\Administrator\Desktop\1.txt")
Text2 = Plugin.File.ReadFileEx("C:\Users\Administrator\Desktop\2.txt")
MyArray1 = Split(Text1, "|")//以行為單位分拆
MyArray2 = Split(Text2, "|")//以行為單位分拆
//RunApp "電腦的文件路徑"
call RunApp ("C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe")
Delay 200
Hwnd = Plugin.Window.Foreground() //獲得當前窗口的句柄
//Hwnd = Plugin.Window.MousePoint()//獲得鼠標指向窗口句柄
delay 200
Call Plugin.Window.Max(Hwnd) //最大化窗口
Delay 200
For i = 0 To 19
KeyDown 17, 1
KeyPress 84, 1
KeyUp 17, 1
Delay 500
SayString MyArray1(i) & "/dadadadada"
KeyPress "Enter", 1
Delay 4000
KeyPress "Tab", 2
Delay 10
SayString"admin"//輸入賬號
Delay 500
KeyPress "Tab", 1
Delay 500
SayString"ckxytea!@"//輸入密碼
//遇到waitkey暫停指令 需要任意按一下鍵盤 才繼續執行
key = 0
Do Until key = 13 //循環必須找到 key=回車鍵 才繼續執行
key = WaitKey()
Loop
KeyPress "Enter", 1
Delay 8000
MoveTo 16,222//模塊位置 自己獲取
Delay 500
LeftClick 1
Delay 2000
KeyPress 9, 7
Delay 500
KeyDown 13, 1
Delay 3000
For i1 = 0 To 19
If i1 = i Then
i1=i+1
End If
MoveTo 1500,160
Delay 500
LeftClick 1
Delay 500
KeyPress 9, 1
Delay 500
KeyDown 13, 1
Delay 3000
KeyPress 9, 2
Delay 500
SayString "http://"& MyArray1(i1)
Delay 500
KeyPress 9, 1
Delay 500
SayString MyArray2(i1)
Delay 500
KeyPress 9, 7
Delay 500
KeyPress 39, 1
Delay 500
KeyPress 13, 1
Delay 3000
Next
Next
