I have a task that I need to select an email, pasted it into a box, press enter and then repeat.
Unfortunately I can't type all the required emails into the submit box at once, and autohotkey seems to be typing too quickly for some methods to work.
If required, I can put the emails into an array for a method to work, but obviously I want to streamline the task as much as possible.
I want to basically select all emails, copy to clipboard, click on the box I need to paste to, then press function button, pastes first email then pause for a few seconds for the program to update before moving into the next email in the clipboard.
As an example:
So I would copy the following to clipboard (ctrl C)
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
then function button (windows b for example)
paste [email protected]
press enter
pause for loading
paste [email protected]
paste press enter
pause for loading
paste [email protected]
press enter
pause for loading
paste [email protected]
press enter
pause for loading
paste [email protected]
press enter
pause for loading
Please let me know of any ideas you may have. I've been playing around with this for a while.
/*
Code: Select all
#b::
Loop, parse, clipboard
{
send %A_LoopField%
if (A_LoopField == ".com") ;will add other domains once working
Send {Enter}
sleep, 30 ;delay in ms
}
Return
Code: Select all
#b::
cellArray := ["[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",]
for i, element in cellArray ; Read all elements of cellArray
{
MsgBox, Yes, the element belongs to the array. %i%, %element% ; Message + Number and element as info
cell := cellArray[i+1] ; Pick next element
MsgBox, %cell% ; Show next element in a message box
}
return
/*
Code: Select all
#b::
myCopiedClipboard := Trim(clipboard)
Sleep, 100
linesInArraySeperatedbyNewLine := []
Loop, Parse, myCopiedClipboard, `n, `r
if Trim(A_LoopField)
linesInArraySeperatedbyNewLine.Push(A_LoopField)
MsgBox, % linesInArraySeperatedbyNewLine.MaxIndex()
; Just testing to see how many lines I read in
Loop, 1
{
Send, %myCopiedClipboard%
Sleep, 1000
Send, {ENTER 2} ; separator
}
Return