I would like to do the following :
If I select a text like this " Apple 6 " and press a hotkey ( for ex ctrl-shift-down ) it will copy " Apple 6 " six(6) times in a specific notepad document, one under the other.
Apple 6
Apple 6
Apple 6
Apple 6
Apple 6
Apple 6
Then, if I select " Toaster 3" and do the same hotkey, it will copy "Toaster 3" three times under the previous.
Apple 6
Apple 6
Apple 6
Apple 6
Apple 6
Apple 6
Toaster 3
Toaster 3
Toaster 3
Then , if I select another string of text that has a number in it, it will copy the full string even if the number is not at the end of the sentence. " I want 2 kittens for my experiences " would then be :
Apple 6
Apple 6
Apple 6
Apple 6
Apple 6
Apple 6
Toaster 3
Toaster 3
Toaster 3
I want 2 kittens for my experiences
I want 2 kittens for my experiences
...etc...
However, I would like that if its a 2 digit number (lets say 12) it will copy it 12 times, (1+2 times).
I "know" how to copy a string at the end of a notepad document, however I do not know how to do the counting part. When I say "I know", I mean that I've been given a script for a specific task that I asked here I believe, and I've understood some parts of it enough to modify it for different needs, however I have too many holes in what I understand to be able to push it further.
Here is what I use to copy selected text at the end of a specific tab in Notepad++ called "Bucket List".
Code: Select all
^+left::
^+s::
titleOfTab:="new 1"
if !WinExist("ahk_exe notepad++.exe")
return
Clipboard:=""
Send,^c
ClipWait,1
if ErrorLevel
return
WinActivate ahk_exe notepad++.exe
WinWaitActive ahk_exe notepad++.exe
WinGetActiveTitle,title
t:=title
ctr:=0
goBack:=0
SetTitleMatchMode,2
Loop
{
Send,^{Pgdn}
ctr++
WinWaitNotActive, %title%
WinGetActiveTitle,title
if InStr(title,titleOfTab)
{
SendInput,{Pgdn}
Sleep,50
SendInput,{Enter}{Enter}{Enter}
Sleep,50
SendInput,^v
goBack:=1
break
}
} until (t=title)
if !goBack
return
Loop, %ctr%
{
Send,^{Pgup}
Sleep,25
}
Send {alt down}{tab}{alt up}
;Msgbox Pasted !!
return
Thank you!