Code: Select all
ifWinExist, Whatsapp
}
{
send %ClipBoard%{ENTER}
}
{
Code: Select all
#IfWinActive, WhatsApp
^m::send %ClipBoard%{ENTER}
boiler wrote:This would be better, but what do you mean by "from the bottom to the top"?Code: Select all
#IfWinActive, WhatsApp ^m::send %ClipBoard%{ENTER}
Code: Select all
#IfWinActive, WhatsApp
Var := Clipboard
StringReplace, Var, Var, `n, `n, UseErrorLevel
if SubStr(Var, 0) != "`n" ;Checks the total amount of lines in a variable/Clipboard
ErrorLevel++
LineIndex = %ErrorLevel%
^m::
Loop, Parse, Clipboard, `n
{
If(A_Index == LineIndex){ ;If current line is equal to the number in LineIndex...
CurrentLine = %A_LoopField%
Send, %CurrentLine%{ENTER} ;...Then send current line
LineIndex-- ;Sends in reverse
Break
}
}
Return
Here, try this:sir the reverse stuff worked but it just pastes a word per command, pls i want it to paste all the lines at once sir.
Code: Select all
#IfWinActive, WhatsApp
^m::
clpbrd := Clipboard
ArrayOfText := StrSplit(clpbrd , "`r")
Clipboard :=
LineIndex := ArrayOfText._MaxIndex()
for index, value in ArrayOfText
ArrayOfText[index] := Trim(value, "`n")
Loop
{
if (LineIndex<>1)
{
Clipboard .= ArrayOfText[LineIndex] . "`r`n"
}
else
{
Clipboard .= ArrayOfText[LineIndex]
}
LineIndex--
} Until LineIndex = 0
Send, %Clipboard%{Enter}
Return
Cuadrix wrote:Here, try this:sir the reverse stuff worked but it just pastes a word per command, pls i want it to paste all the lines at once sir.Good luck.Code: Select all
#IfWinActive, WhatsApp ^m:: clpbrd := Clipboard ArrayOfText := StrSplit(clpbrd , "`r") Clipboard := LineIndex := ArrayOfText._MaxIndex() for index, value in ArrayOfText ArrayOfText[index] := Trim(value, "`n") Loop { if (LineIndex<>1) { Clipboard .= ArrayOfText[LineIndex] . "`r`n" } else { Clipboard .= ArrayOfText[LineIndex] } LineIndex-- } Until LineIndex = 0 Send, %Clipboard%{Enter} Return
How about making it to paste in bulk in reverse cos its kinda slow pasting in reverse with respect to text lines, sir.legend maxfreak wrote:Cuadrix wrote:Here, try this:sir the reverse stuff worked but it just pastes a word per command, pls i want it to paste all the lines at once sir.Good luck.Code: Select all
#IfWinActive, WhatsApp ^m:: clpbrd := Clipboard ArrayOfText := StrSplit(clpbrd , "`r") Clipboard := LineIndex := ArrayOfText._MaxIndex() for index, value in ArrayOfText ArrayOfText[index] := Trim(value, "`n") Loop { if (LineIndex<>1) { Clipboard .= ArrayOfText[LineIndex] . "`r`n" } else { Clipboard .= ArrayOfText[LineIndex] } LineIndex-- } Until LineIndex = 0 Send, %Clipboard%{Enter} Return
It worked sir, am so damned happy sir, God bless you.
legend maxfreak wrote:legend maxfreak wrote:Cuadrix wrote:Here, try this:sir the reverse stuff worked but it just pastes a word per command, pls i want it to paste all the lines at once sir.Good luck.Code: Select all
#IfWinActive, WhatsApp ^m:: clpbrd := Clipboard ArrayOfText := StrSplit(clpbrd , "`r") Clipboard := LineIndex := ArrayOfText._MaxIndex() for index, value in ArrayOfText ArrayOfText[index] := Trim(value, "`n") Loop { if (LineIndex<>1) { Clipboard .= ArrayOfText[LineIndex] . "`r`n" } else { Clipboard .= ArrayOfText[LineIndex] } LineIndex-- } Until LineIndex = 0 Send, %Clipboard%{Enter} Return
Users browsing this forum: sn1perwild and 105 guests