Code: Select all
F1::
FileReadLine, line, c:\users\sunny\desktop\wsend.txt, %A_Index%
RUN, chrome.exe https://api.whatsapp.com/send?phone=601%line%&text=
return
Code: Select all
F1::
FileReadLine, line, c:\users\sunny\desktop\wsend.txt, %A_Index%
RUN, chrome.exe https://api.whatsapp.com/send?phone=601%line%&text=
return
Code: Select all
Loop, Read, c:\users\sunny\desktop\wsend.txt
Run,% "chrome.exe https://api.whatsapp.com/send?phone=601" . A_LoopReadLine . "&text="
Return
it works but it keep looping. and pop out.BoBo wrote: ↑25 Nov 2020, 04:52Untested.Code: Select all
Loop, Read, c:\users\sunny\desktop\wsend.txt Run,% "chrome.exe https://api.whatsapp.com/send?phone=601" . A_LoopReadLine . "&text=" Return
The built-in variable A_Index contains the number of the current loop iteration. It contains 1 the first time the loop's body is executed. For the second time, it contains 2; and so on. If an inner loop is enclosed by an outer loop, the inner loop takes precedence. A_Index works inside all types of loops, including file-loops and registry-loops; but A_Index contains 0 outside of a loop.
Code: Select all
lineNum := 0, addresses := A_Desktop "\wsend.txt"
F1::
FileReadLine, line, %addresses%, % ++lineNum
If ErrorLevel {
MsgBox, 48, Done, There are no more addresses.
lineNum := 0
} Else Run, chrome.exe https://api.whatsapp.com/send?phone=601%line%
Return
Users browsing this forum: Bing [Bot] and 173 guests