0
所以这是我第一个AHK程序,我对语言一点也不熟悉。不过我对C#很熟悉。我有以下`程序循环通过一个文件并分割用管道(|)符号分割的用户名和密码。现在,当我运行程序时,它不会在文件结束后停止循环。AutoHotKey - 循环文件在文件结束后不再停止,发送不发送变量
另外,我尝试使用StrSplit函数访问由管道符号分隔的用户名和密码。到目前为止,当我运行该程序时,用户名有时只是entered
正确进入浏览器。密码不会输入到浏览器中。我很确定`我正在使用鼠标右键。
在此先感谢您的帮助!
#SingleInstance, Force
SetWorkingDir, %A_ScriptDir% ; if an absolute path isn't specified
;; GUI input
;-------------------------------
; ---------------------------------------
Gui, Add, Button, x10 y20 gStart, Start the tool
Gui, Show, w300 h300, Steam Tool
return
; Labels
; -----------------------
; --------------------------------
Start:
Loop, read, accounts.txt ; the file name must be separated by a comma
{
; MsgBox %A_LoopReadLine%
loop, parse, A_LoopReadLine,
{
IfWinNotExist, Multiloginapp - 01.3.15
{
Run, C:\Program Files (x86)\Multiloginapp\multiloginapp.exe
WinWait, Multiloginapp - 01.3.15
Sleep, 20000
}
IfWinNotActive, Multiloginapp - 01.3.15, ,WinActivate, Multiloginapp - 01.3.15
WinWaitActive, Multiloginapp - 01.3.15
Click 724, 260
sleep, 1500
WinWait, Multiloginapp - Mozilla Firefox
WinActivate, Multiloginapp - Mozilla Firefox
WinWaitActive, Multiloginapp - Mozilla Firefox
Click 408, 55
Sleep 5000
Send, ^a
Send, {Backspace}
SendInput, store.steampowered.com/account ; SendInput is faster in sending text
Send, {enter}
Sleep, 5000
; Use:
; SendInput, %A_LoopField%
; if you want to send the current substring (field) from the line
s:=StrSplit(A_LoopReadLine, "|")
Click, 149, 355
urnme := s[0]
Send, %usrnme%
Click, 172 455
pwd := s[1]
Send, %pwd%
Click, 87 507
}
}
return
L对我来说就像你在使用循环,解析错误。我会尝试循环,解析,A_LoopReadLine,CSV,因为你提到你的文件是逗号分隔。 – errorseven